postgres=# select pg_switch_wal();
pg_switch_wal
---------------
6/19F03EA8
[pg13@sdw2 pg_wal]$ pg_waldump 00000001000000060000001A
rmgr: Standby len (rec/tot): 50/ 50, tx: 0, lsn: 6/1A000028, prev 6/19F03E90, desc: RUNNING_XACTS nextXid 20316 latestCompletedXid 20315 oldestRunningXid 20316
postgres=# truncate table t_log_test ;
TRUNCATE TABLE
[pg13@sdw2 pg_wal]$ pg_waldump 00000001000000060000001A
rmgr: Standby len (rec/tot): 50/ 50, tx: 0, lsn: 6/1A000028, prev 6/19F03E90, desc: RUNNING_XACTS nextXid 20316 latestCompletedXid 20315 oldestRunningXid 20316
**1 锁定表pg_class.oid=66338(t_log_tetst,原始的relfilenode=66344)**
rmgr: Standby len (rec/tot): 42/ 42, tx: 20316, lsn: 6/1A000060, prev 6/1A000028, desc: LOCK xid 20316 db 13580 rel 66338
**2 创建新的pg_class.relfilenode=66347(t_log_tetst)**
rmgr: Storage len (rec/tot): 42/ 42, tx: 20316, lsn: 6/1A000090, prev 6/1A000060, desc: CREATE base/13580/66347
**3 更新数据字典pg_class,oid=1259**
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20316, lsn: 6/1A0000C0, prev 6/1A000090, desc: NEW_CID rel 1663/13580/1259; tid 15/13; cmin: 4294967295, cmax: 0, combo: 4294967295
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20316, lsn: 6/1A000100, prev 6/1A0000C0, desc: NEW_CID rel 1663/13580/1259; tid 15/15; cmin: 0, cmax: 4294967295, combo: 4294967295
**4 pg_class更新的块地址**
rmgr: Heap len (rec/tot): 123/ 123, tx: 20316, lsn: 6/1A000140, prev 6/1A000100, desc: UPDATE off 13 xmax 20316 flags 0x60 ; new off 15 xmax 0, blkref #0: rel 1663/13580/1259 blk 15
## 5 更新pg_class的索引pg_class_oid_index ##
rmgr: Btree len (rec/tot): 64/ 64, tx: 20316, lsn: 6/1A0001C0, prev 6/1A000140, desc: INSERT_LEAF off 323, blkref #0: rel 1663/13580/2662 blk 2
## 6 更新pg_class的索引pg_class_relname_nsp_index ##
rmgr: Btree len (rec/tot): 72/ 72, tx: 20316, lsn: 6/1A000200, prev 6/1A0001C0, desc: INSERT_LEAF off 112, blkref #0: rel 1663/13580/2663 blk 7
## 7 更新pg_class的索引pg_class_tblspc_relfilenode_index** ##
rmgr: Btree len (rec/tot): 64/ 64, tx: 20316, lsn: 6/1A000248, prev 6/1A000200, desc: INSERT_LEAF off 263, blkref #0: rel 1663/13580/3455 blk 4
## 8 开始truncate老表,切换新的relfilenode##
rmgr: Heap len (rec/tot): 42/ 42, tx: 20316, lsn: 6/1A000288, prev 6/1A000248, desc: TRUNCATE nrelids 1 relids 66338
rmgr: Transaction len (rec/tot): 114/ 114, tx: 20316, lsn: 6/1A0002B8, prev 6/1A000288, desc: COMMIT 2022-03-04 04:53:41.577727 CST; rels: base/13580/66344; inval msgs: catcache 50 catcache 49 relcache 66338
总结:truncat的后台操作是生成新的relfilenode,老的暂时没有删除。等更新完数据字典后,开始清除老表的数据。并切换新的relfilenode
[pg13@sdw2 pg_wal]$ pg_waldump 00000001000000060000001D
rmgr: Standby len (rec/tot): 50/ 50, tx: 0, lsn: 6/1D000028, prev 6/1C000820, desc: RUNNING_XACTS nextXid 20320 latestCompletedXid 20319 oldestRunningXid 20320
rmgr: Standby len (rec/tot): 42/ 42, tx: 20320, lsn: 6/1D000060, prev 6/1D000028, desc: LOCK xid 20320 db 13580 rel 66338
## 1 创建relfilenode=66354指向t_log_test ##
rmgr: Storage len (rec/tot): 42/ 42, tx: 20320, lsn: 6/1D000090, prev 6/1D000060, desc: CREATE base/13580/66354_init
## 2 写入pg_type以及相关索引,并且是FPW的方式 ##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D0000C0, prev 6/1D000090, desc: NEW_CID rel 1663/13580/1247; tid 11/11; cmin: 0, cmax: 4294967295, combo: 4294967295
rmgr: Heap len (rec/tot): 56/ 494, tx: 20320, lsn: 6/1D000100, prev 6/1D0000C0, desc: INSERT off 11 flags 0x00, blkref #0: rel 1663/13580/1247 blk 11 FPW
rmgr: Btree len (rec/tot): 55/ 2182, tx: 20320, lsn: 6/1D0002F0, prev 6/1D000100, desc: INSERT_LEAF off 203, blkref #0: rel 1663/13580/2703 blk 2 FPW
rmgr: Btree len (rec/tot): 55/ 3170, tx: 20320, lsn: 6/1D000B78, prev 6/1D0002F0, desc: INSERT_LEAF off 114, blkref #0: rel 1663/13580/2704 blk 4 FPW
## 3 写入pg_depend以及相关索引,并且是FPW ##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D0017E0, prev 6/1D000B78, desc: NEW_CID rel 1663/13580/2608; tid 65/43; cmin: 0, cmax: 4294967295, combo: 4294967295
rmgr: Heap len (rec/tot): 56/ 872, tx: 20320, lsn: 6/1D001820, prev 6/1D0017E0, desc: INSERT off 43 flags 0x00, blkref #0: rel 1663/13580/2608 blk 65 FPW
rmgr: Btree len (rec/tot): 55/ 2143, tx: 20320, lsn: 6/1D001B88, prev 6/1D001820, desc: INSERT_LEAF off 190, blkref #0: rel 1663/13580/2673 blk 36 FPW
rmgr: Btree len (rec/tot): 55/ 2338, tx: 20320, lsn: 6/1D002400, prev 6/1D001B88, desc: INSERT_LEAF off 218, blkref #0: rel 1663/13580/2674 blk 50 FPW
## 4 写入pg_type以及索引行数据##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D002D28, prev 6/1D002400, desc: NEW_CID rel 1663/13580/1247; tid 11/12; cmin: 0, cmax: 4294967295, combo: 4294967295
rmgr: Heap len (rec/tot): 207/ 207, tx: 20320, lsn: 6/1D002D68, prev 6/1D002D28, desc: INSERT off 12 flags 0x00, blkref #0: rel 1663/13580/1247 blk 11
rmgr: Btree len (rec/tot): 64/ 64, tx: 20320, lsn: 6/1D002E38, prev 6/1D002D68, desc: INSERT_LEAF off 203, blkref #0: rel 1663/13580/2703 blk 2
rmgr: Btree len (rec/tot): 55/ 2223, tx: 20320, lsn: 6/1D002E78, prev 6/1D002E38, desc: INSERT_LEAF off 69, blkref #0: rel 1663/13580/2704 blk 1 FPW
## 5 写入pg_depend以及索引行数据##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D003728, prev 6/1D002E78, desc: NEW_CID rel 1663/13580/2608; tid 65/44; cmin: 0, cmax: 4294967295, combo: 4294967295
rmgr: Heap len (rec/tot): 80/ 80, tx: 20320, lsn: 6/1D003768, prev 6/1D003728, desc: INSERT off 44 flags 0x00, blkref #0: rel 1663/13580/2608 blk 65
rmgr: Btree len (rec/tot): 72/ 72, tx: 20320, lsn: 6/1D0037B8, prev 6/1D003768, desc: INSERT_LEAF off 190, blkref #0: rel 1663/13580/2673 blk 36
rmgr: Btree len (rec/tot): 55/ 2130, tx: 20320, lsn: 6/1D003800, prev 6/1D0037B8, desc: INSERT_LEAF off 199, blkref #0: rel 1663/13580/2674 blk 41 FPW
## 6写入pg_class以及相关索引,以FPW方式##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D004070, prev 6/1D003800, desc: NEW_CID rel 1663/13580/1259; tid 15/22; cmin: 0, cmax: 4294967295, combo: 4294967295
rmgr: Heap len (rec/tot): 56/ 931, tx: 20320, lsn: 6/1D0040B0, prev 6/1D004070, desc: INSERT off 22 flags 0x00, blkref #0: rel 1663/13580/1259 blk 15 FPW
rmgr: Btree len (rec/tot): 55/ 3490, tx: 20320, lsn: 6/1D004458, prev 6/1D0040B0, desc: INSERT_LEAF off 334, blkref #0: rel 1663/13580/2662 blk 2 FPW
rmgr: Btree len (rec/tot): 55/ 1487, tx: 20320, lsn: 6/1D005200, prev 6/1D004458, desc: INSERT_LEAF off 51, blkref #0: rel 1663/13580/2663 blk 5 FPW
rmgr: Btree len (rec/tot): 55/ 2847, tx: 20320, lsn: 6/1D0057D0, prev 6/1D005200, desc: INSERT_LEAF off 270, blkref #0: rel 1663/13580/3455 blk 4 FPW
## 7写入pg_attribute以及相关索引,以FPW模式 ##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D006308, prev 6/1D0057D0, desc: NEW_CID rel 1663/13580/1249; tid 63/41; cmin: 0, cmax: 4294967295, combo: 4294967295
rmgr: Heap len (rec/tot): 56/ 851, tx: 20320, lsn: 6/1D006348, prev 6/1D006308, desc: INSERT off 41 flags 0x00, blkref #0: rel 1663/13580/1249 blk 63 FPW
rmgr: Btree len (rec/tot): 55/ 559, tx: 20320, lsn: 6/1D0066A0, prev 6/1D006348, desc: INSERT_LEAF off 41, blkref #0: rel 1663/13580/2658 blk 21 FPW
rmgr: Btree len (rec/tot): 55/ 1548, tx: 20320, lsn: 6/1D0068D0, prev 6/1D0066A0, desc: INSERT_LEAF off 134, blkref #0: rel 1663/13580/2659 blk 14 FPW
## 8 写入pg_attribute行以及索引数据##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D006EE0, prev 6/1D0068D0, desc: NEW_CID rel 1663/13580/1249; tid 63/42; cmin: 0, cmax: 4294967295, combo: 4294967295
rmgr: Heap len (rec/tot): 175/ 175, tx: 20320, lsn: 6/1D006F20, prev 6/1D006EE0, desc: INSERT off 42 flags 0x00, blkref #0: rel 1663/13580/1249 blk 63
rmgr: Btree len (rec/tot): 64/ 64, tx: 20320, lsn: 6/1D006FD0, prev 6/1D006F20, desc: INSERT_LEAF off 42, blkref #0: rel 1663/13580/2658 blk 21
rmgr: Btree len (rec/tot): 64/ 64, tx: 20320, lsn: 6/1D007010, prev 6/1D006FD0, desc: INSERT_LEAF off 135, blkref #0: rel 1663/13580/2659 blk 14
## 8.1 写入pg_attribute行以及索引数据(多行)##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D007050, prev 6/1D007010, desc: NEW_CID rel 1663/13580/1249; tid 63/43; cmin: 0, cmax: 4294967295, combo: 4294967295
rmgr: Heap len (rec/tot): 175/ 175, tx: 20320, lsn: 6/1D007090, prev 6/1D007050, desc: INSERT off 43 flags 0x00, blkref #0: rel 1663/13580/1249 blk 63
rmgr: Btree len (rec/tot): 72/ 72, tx: 20320, lsn: 6/1D007140, prev 6/1D007090, desc: INSERT_LEAF off 41, blkref #0: rel 1663/13580/2658 blk 21
rmgr: Btree len (rec/tot): 64/ 64, tx: 20320, lsn: 6/1D007188, prev 6/1D007140, desc: INSERT_LEAF off 134, blkref #0: rel 1663/13580/2659 blk 14
## 8.2 写入pg_attribute行以及索引数据(多行)##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D0071C8, prev 6/1D007188, desc: NEW_CID rel 1663/13580/1249; tid 63/44; cmin: 0, cmax: 4294967295, combo: 4294967295
rmgr: Heap len (rec/tot): 175/ 175, tx: 20320, lsn: 6/1D007208, prev 6/1D0071C8, desc: INSERT off 44 flags 0x00, blkref #0: rel 1663/13580/1249 blk 63
rmgr: Btree len (rec/tot): 72/ 72, tx: 20320, lsn: 6/1D0072B8, prev 6/1D007208, desc: INSERT_LEAF off 44, blkref #0: rel 1663/13580/2658 blk 21
rmgr: Btree len (rec/tot): 64/ 64, tx: 20320, lsn: 6/1D007300, prev 6/1D0072B8, desc: INSERT_LEAF off 134, blkref #0: rel 1663/13580/2659 blk 14
## 8.3 写入pg_attribute行以及索引数据(多行)##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D007340, prev 6/1D007300, desc: NEW_CID rel 1663/13580/1249; tid 63/45; cmin: 0, cmax: 4294967295, combo: 4294967295
rmgr: Heap len (rec/tot): 175/ 175, tx: 20320, lsn: 6/1D007380, prev 6/1D007340, desc: INSERT off 45 flags 0x00, blkref #0: rel 1663/13580/1249 blk 63
rmgr: Btree len (rec/tot): 72/ 72, tx: 20320, lsn: 6/1D007430, prev 6/1D007380, desc: INSERT_LEAF off 41, blkref #0: rel 1663/13580/2658 blk 21
rmgr: Btree len (rec/tot): 64/ 64, tx: 20320, lsn: 6/1D007478, prev 6/1D007430, desc: INSERT_LEAF off 134, blkref #0: rel 1663/13580/2659 blk 14
## 8.4 写入pg_attribute行以及索引数据(多行)##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D0074B8, prev 6/1D007478, desc: NEW_CID rel 1663/13580/1249; tid 63/46; cmin: 0, cmax: 4294967295, combo: 4294967295
rmgr: Heap len (rec/tot): 175/ 175, tx: 20320, lsn: 6/1D0074F8, prev 6/1D0074B8, desc: INSERT off 46 flags 0x00, blkref #0: rel 1663/13580/1249 blk 63
rmgr: Btree len (rec/tot): 72/ 72, tx: 20320, lsn: 6/1D0075A8, prev 6/1D0074F8, desc: INSERT_LEAF off 45, blkref #0: rel 1663/13580/2658 blk 21
rmgr: Btree len (rec/tot): 64/ 64, tx: 20320, lsn: 6/1D0075F0, prev 6/1D0075A8, desc: INSERT_LEAF off 134, blkref #0: rel 1663/13580/2659 blk 14
## 8.5 写入pg_attribute行以及索引数据(多行)##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D007630, prev 6/1D0075F0, desc: NEW_CID rel 1663/13580/1249; tid 63/47; cmin: 0, cmax: 4294967295, combo: 4294967295
rmgr: Heap len (rec/tot): 175/ 175, tx: 20320, lsn: 6/1D007670, prev 6/1D007630, desc: INSERT off 47 flags 0x00, blkref #0: rel 1663/13580/1249 blk 63
rmgr: Btree len (rec/tot): 72/ 72, tx: 20320, lsn: 6/1D007720, prev 6/1D007670, desc: INSERT_LEAF off 41, blkref #0: rel 1663/13580/2658 blk 21
rmgr: Btree len (rec/tot): 64/ 64, tx: 20320, lsn: 6/1D007768, prev 6/1D007720, desc: INSERT_LEAF off 134, blkref #0: rel 1663/13580/2659 blk 14
## 8.6 写入pg_attribute行以及索引数据(多行)##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D0077A8, prev 6/1D007768, desc: NEW_CID rel 1663/13580/1249; tid 63/48; cmin: 0, cmax: 4294967295, combo: 4294967295
rmgr: Heap len (rec/tot): 175/ 175, tx: 20320, lsn: 6/1D0077E8, prev 6/1D0077A8, desc: INSERT off 48 flags 0x00, blkref #0: rel 1663/13580/1249 blk 63
rmgr: Btree len (rec/tot): 72/ 72, tx: 20320, lsn: 6/1D007898, prev 6/1D0077E8, desc: INSERT_LEAF off 46, blkref #0: rel 1663/13580/2658 blk 21
rmgr: Btree len (rec/tot): 64/ 64, tx: 20320, lsn: 6/1D0078E0, prev 6/1D007898, desc: INSERT_LEAF off 134, blkref #0: rel 1663/13580/2659 blk 14
## 9 写入pg_depend行数据以及索引##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D007920, prev 6/1D0078E0, desc: NEW_CID rel 1663/13580/2608; tid 65/45; cmin: 0, cmax: 4294967295, combo: 4294967295
rmgr: Heap len (rec/tot): 80/ 80, tx: 20320, lsn: 6/1D007960, prev 6/1D007920, desc: INSERT off 45 flags 0x00, blkref #0: rel 1663/13580/2608 blk 65
rmgr: Btree len (rec/tot): 55/ 1116, tx: 20320, lsn: 6/1D0079B0, prev 6/1D007960, desc: INSERT_LEAF off 100, blkref #0: rel 1663/13580/2673 blk 37 FPW
rmgr: Btree len (rec/tot): 55/ 2173, tx: 20320, lsn: 6/1D007E10, prev 6/1D0079B0, desc: INSERT_LEAF off 229, blkref #0: rel 1663/13580/2674 blk 37 FPW
rmgr: Standby len (rec/tot): 42/ 42, tx: 20320, lsn: 6/1D0086A8, prev 6/1D007E10, desc: LOCK xid 20320 db 13580 rel 66354
## 10 写入pg_class行数据以及索引##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D0086D8, prev 6/1D0086A8, desc: NEW_CID rel 1663/13580/1259; tid 15/20; cmin: 4294967295, cmax: 1, combo: 4294967295
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D008718, prev 6/1D0086D8, desc: NEW_CID rel 1663/13580/1259; tid 15/23; cmin: 1, cmax: 4294967295, combo: 4294967295
rmgr: Heap len (rec/tot): 123/ 123, tx: 20320, lsn: 6/1D008758, prev 6/1D008718, desc: UPDATE off 20 xmax 20320 flags 0x60 ; new off 23 xmax 0, blkref #0: rel 1663/13580/1259 blk 15
rmgr: Btree len (rec/tot): 64/ 64, tx: 20320, lsn: 6/1D0087D8, prev 6/1D008758, desc: INSERT_LEAF off 326, blkref #0: rel 1663/13580/2662 blk 2
rmgr: Btree len (rec/tot): 55/ 2491, tx: 20320, lsn: 6/1D008818, prev 6/1D0087D8, desc: INSERT_LEAF off 115, blkref #0: rel 1663/13580/2663 blk 7 FPW
rmgr: Btree len (rec/tot): 64/ 64, tx: 20320, lsn: 6/1D0091D8, prev 6/1D008818, desc: INSERT_LEAF off 271, blkref #0: rel 1663/13580/3455 blk 4
## 10.1 写入pg_class行数据以及索引##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D009218, prev 6/1D0091D8, desc: NEW_CID rel 1663/13580/1259; tid 15/22; cmin: 0, cmax: 1, combo: 0
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D009258, prev 6/1D009218, desc: NEW_CID rel 1663/13580/1259; tid 15/24; cmin: 1, cmax: 4294967295, combo: 4294967295
rmgr: Heap len (rec/tot): 105/ 105, tx: 20320, lsn: 6/1D009298, prev 6/1D009258, desc: UPDATE off 22 xmax 20320 flags 0x60 ; new off 24 xmax 0, blkref #0: rel 1663/13580/1259 blk 15
rmgr: Btree len (rec/tot): 64/ 64, tx: 20320, lsn: 6/1D009308, prev 6/1D009298, desc: INSERT_LEAF off 336, blkref #0: rel 1663/13580/2662 blk 2
rmgr: Btree len (rec/tot): 80/ 80, tx: 20320, lsn: 6/1D009348, prev 6/1D009308, desc: INSERT_LEAF off 52, blkref #0: rel 1663/13580/2663 blk 5
rmgr: Btree len (rec/tot): 64/ 64, tx: 20320, lsn: 6/1D009398, prev 6/1D009348, desc: INSERT_LEAF off 270, blkref #0: rel 1663/13580/3455 blk 4
## 11 写入pg_type行数据以及索引##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D0093D8, prev 6/1D009398, desc: NEW_CID rel 1663/13580/1247; tid 11/12; cmin: 0, cmax: 2, combo: 1
rmgr: Heap len (rec/tot): 54/ 54, tx: 20320, lsn: 6/1D009418, prev 6/1D0093D8, desc: DELETE off 12 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1247 blk 11
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D009450, prev 6/1D009418, desc: NEW_CID rel 1663/13580/2608; tid 65/44; cmin: 0, cmax: 2, combo: 1
rmgr: Heap len (rec/tot): 54/ 54, tx: 20320, lsn: 6/1D009490, prev 6/1D009450, desc: DELETE off 44 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/2608 blk 65
## 11.1 写入pg_type行数据以及索引##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D0094C8, prev 6/1D009490, desc: NEW_CID rel 1663/13580/1247; tid 11/11; cmin: 0, cmax: 3, combo: 2
rmgr: Heap len (rec/tot): 54/ 54, tx: 20320, lsn: 6/1D009508, prev 6/1D0094C8, desc: DELETE off 11 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1247 blk 11
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D009540, prev 6/1D009508, desc: NEW_CID rel 1663/13580/2608; tid 65/43; cmin: 0, cmax: 3, combo: 2
rmgr: Heap len (rec/tot): 54/ 54, tx: 20320, lsn: 6/1D009580, prev 6/1D009540, desc: DELETE off 43 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/2608 blk 65
## 12 写入pg_attribute行数据以及索引##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D0095B8, prev 6/1D009580, desc: NEW_CID rel 1663/13580/1249; tid 63/48; cmin: 0, cmax: 4, combo: 3
rmgr: Heap len (rec/tot): 54/ 54, tx: 20320, lsn: 6/1D0095F8, prev 6/1D0095B8, desc: DELETE off 48 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1249 blk 63
## 12.1 写入pg_attribute行数据以及索引##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D009630, prev 6/1D0095F8, desc: NEW_CID rel 1663/13580/1249; tid 63/47; cmin: 0, cmax: 4, combo: 3
rmgr: Heap len (rec/tot): 54/ 54, tx: 20320, lsn: 6/1D009670, prev 6/1D009630, desc: DELETE off 47 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1249 blk 63
## 12.2 写入pg_attribute行数据以及索引##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D0096A8, prev 6/1D009670, desc: NEW_CID rel 1663/13580/1249; tid 63/46; cmin: 0, cmax: 4, combo: 3
rmgr: Heap len (rec/tot): 54/ 54, tx: 20320, lsn: 6/1D0096E8, prev 6/1D0096A8, desc: DELETE off 46 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1249 blk 63
## 12.3 写入pg_attribute行数据以及索引##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D009720, prev 6/1D0096E8, desc: NEW_CID rel 1663/13580/1249; tid 63/45; cmin: 0, cmax: 4, combo: 3
rmgr: Heap len (rec/tot): 54/ 54, tx: 20320, lsn: 6/1D009760, prev 6/1D009720, desc: DELETE off 45 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1249 blk 63
## 12.4 写入pg_attribute行数据以及索引##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D009798, prev 6/1D009760, desc: NEW_CID rel 1663/13580/1249; tid 63/44; cmin: 0, cmax: 4, combo: 3
rmgr: Heap len (rec/tot): 54/ 54, tx: 20320, lsn: 6/1D0097D8, prev 6/1D009798, desc: DELETE off 44 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1249 blk 63
## 12.5 写入pg_attribute行数据以及索引##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D009810, prev 6/1D0097D8, desc: NEW_CID rel 1663/13580/1249; tid 63/43; cmin: 0, cmax: 4, combo: 3
rmgr: Heap len (rec/tot): 54/ 54, tx: 20320, lsn: 6/1D009850, prev 6/1D009810, desc: DELETE off 43 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1249 blk 63
## 12.6 写入pg_attribute行数据以及索引##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D009888, prev 6/1D009850, desc: NEW_CID rel 1663/13580/1249; tid 63/41; cmin: 0, cmax: 4, combo: 3
rmgr: Heap len (rec/tot): 54/ 54, tx: 20320, lsn: 6/1D0098C8, prev 6/1D009888, desc: DELETE off 41 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1249 blk 63
## 12.7 写入pg_attribute行数据以及索引##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D009900, prev 6/1D0098C8, desc: NEW_CID rel 1663/13580/1249; tid 63/42; cmin: 0, cmax: 4, combo: 3
rmgr: Heap len (rec/tot): 54/ 54, tx: 20320, lsn: 6/1D009940, prev 6/1D009900, desc: DELETE off 42 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1249 blk 63
## 13 写入pg_class行数据以及索引##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D009978, prev 6/1D009940, desc: NEW_CID rel 1663/13580/1259; tid 15/24; cmin: 1, cmax: 4, combo: 4
rmgr: Heap len (rec/tot): 54/ 54, tx: 20320, lsn: 6/1D0099B8, prev 6/1D009978, desc: DELETE off 24 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1259 blk 15
## 14 写入pg_depend行数据以及索引##
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20320, lsn: 6/1D0099F0, prev 6/1D0099B8, desc: NEW_CID rel 1663/13580/2608; tid 65/45; cmin: 0, cmax: 4, combo: 3
rmgr: Heap len (rec/tot): 54/ 54, tx: 20320, lsn: 6/1D009A30, prev 6/1D0099F0, desc: DELETE off 45 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/2608 blk 65
## 15 ##
rmgr: Transaction len (rec/tot): 965/ 965, tx: 20320, lsn: 6/1D009A68, prev 6/1D009A30, desc: COMMIT 2022-03-04 05:34:54.945848 CST; rels: base/13580/66351; inval msgs: catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 50 catcache 49 catcache 75 catcache 74 catcache 75 catcache 74 catcache 50 catcache 49 catcache 50 catcache 49 catcache 75 catcache 74 catcache 75 catcache 74 catcache 50 catcache 49 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 relcache 66354 snapshot 2608 snapshot 2608 snapshot 2608 relcache 66338 relcache 66354 snapshot 2608 relcache 66354
可见,将表修改为unlogged会修改很多元数据。
## 1 写入定pg_class pg_depend pg_arrtibute等系统表相关信息(和unloggend差不多)##
..........
## 2锁relfilenode=66363对象,即t_log_test,并且开始根据表的数据生成wal日志#
rmgr: Standby len (rec/tot): 42/ 42, tx: 20329, lsn: 6/1F016378, prev 6/1F016320, desc: LOCK xid 20329 db 13580 rel 66363
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0163A8, prev 6/1F016378, desc: INSERT+INIT off 1 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0163F0, prev 6/1F0163A8, desc: INSERT off 2 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016438, prev 6/1F0163F0, desc: INSERT off 3 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016480, prev 6/1F016438, desc: INSERT off 4 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0164C8, prev 6/1F016480, desc: INSERT off 5 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016510, prev 6/1F0164C8, desc: INSERT off 6 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016558, prev 6/1F016510, desc: INSERT off 7 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0165A0, prev 6/1F016558, desc: INSERT off 8 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0165E8, prev 6/1F0165A0, desc: INSERT off 9 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016630, prev 6/1F0165E8, desc: INSERT off 10 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016678, prev 6/1F016630, desc: INSERT off 11 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0166C0, prev 6/1F016678, desc: INSERT off 12 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016708, prev 6/1F0166C0, desc: INSERT off 13 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016750, prev 6/1F016708, desc: INSERT off 14 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016798, prev 6/1F016750, desc: INSERT off 15 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0167E0, prev 6/1F016798, desc: INSERT off 16 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016828, prev 6/1F0167E0, desc: INSERT off 17 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016870, prev 6/1F016828, desc: INSERT off 18 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0168B8, prev 6/1F016870, desc: INSERT off 19 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016900, prev 6/1F0168B8, desc: INSERT off 20 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016948, prev 6/1F016900, desc: INSERT off 21 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016990, prev 6/1F016948, desc: INSERT off 22 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0169D8, prev 6/1F016990, desc: INSERT off 23 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016A20, prev 6/1F0169D8, desc: INSERT off 24 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016A68, prev 6/1F016A20, desc: INSERT off 25 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016AB0, prev 6/1F016A68, desc: INSERT off 26 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016AF8, prev 6/1F016AB0, desc: INSERT off 27 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016B40, prev 6/1F016AF8, desc: INSERT off 28 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016B88, prev 6/1F016B40, desc: INSERT off 29 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016BD0, prev 6/1F016B88, desc: INSERT off 30 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016C18, prev 6/1F016BD0, desc: INSERT off 31 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016C60, prev 6/1F016C18, desc: INSERT off 32 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016CA8, prev 6/1F016C60, desc: INSERT off 33 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016CF0, prev 6/1F016CA8, desc: INSERT off 34 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016D38, prev 6/1F016CF0, desc: INSERT off 35 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016D80, prev 6/1F016D38, desc: INSERT off 36 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016DC8, prev 6/1F016D80, desc: INSERT off 37 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016E10, prev 6/1F016DC8, desc: INSERT off 38 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016E58, prev 6/1F016E10, desc: INSERT off 39 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016EA0, prev 6/1F016E58, desc: INSERT off 40 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016EE8, prev 6/1F016EA0, desc: INSERT off 41 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016F30, prev 6/1F016EE8, desc: INSERT off 42 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016F78, prev 6/1F016F30, desc: INSERT off 43 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F016FC0, prev 6/1F016F78, desc: INSERT off 44 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017008, prev 6/1F016FC0, desc: INSERT off 45 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017050, prev 6/1F017008, desc: INSERT off 46 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017098, prev 6/1F017050, desc: INSERT off 47 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0170E0, prev 6/1F017098, desc: INSERT off 48 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017128, prev 6/1F0170E0, desc: INSERT off 49 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017170, prev 6/1F017128, desc: INSERT off 50 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0171B8, prev 6/1F017170, desc: INSERT off 51 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017200, prev 6/1F0171B8, desc: INSERT off 52 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017248, prev 6/1F017200, desc: INSERT off 53 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017290, prev 6/1F017248, desc: INSERT off 54 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0172D8, prev 6/1F017290, desc: INSERT off 55 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017320, prev 6/1F0172D8, desc: INSERT off 56 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017368, prev 6/1F017320, desc: INSERT off 57 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0173B0, prev 6/1F017368, desc: INSERT off 58 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0173F8, prev 6/1F0173B0, desc: INSERT off 59 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017440, prev 6/1F0173F8, desc: INSERT off 60 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017488, prev 6/1F017440, desc: INSERT off 61 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0174D0, prev 6/1F017488, desc: INSERT off 62 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017518, prev 6/1F0174D0, desc: INSERT off 63 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017560, prev 6/1F017518, desc: INSERT off 64 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0175A8, prev 6/1F017560, desc: INSERT off 65 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0175F0, prev 6/1F0175A8, desc: INSERT off 66 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017638, prev 6/1F0175F0, desc: INSERT off 67 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017680, prev 6/1F017638, desc: INSERT off 68 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0176C8, prev 6/1F017680, desc: INSERT off 69 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017710, prev 6/1F0176C8, desc: INSERT off 70 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017758, prev 6/1F017710, desc: INSERT off 71 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0177A0, prev 6/1F017758, desc: INSERT off 72 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0177E8, prev 6/1F0177A0, desc: INSERT off 73 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017830, prev 6/1F0177E8, desc: INSERT off 74 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017878, prev 6/1F017830, desc: INSERT off 75 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0178C0, prev 6/1F017878, desc: INSERT off 76 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017908, prev 6/1F0178C0, desc: INSERT off 77 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017950, prev 6/1F017908, desc: INSERT off 78 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017998, prev 6/1F017950, desc: INSERT off 79 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F0179E0, prev 6/1F017998, desc: INSERT off 80 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017A28, prev 6/1F0179E0, desc: INSERT off 81 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017A70, prev 6/1F017A28, desc: INSERT off 82 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017AB8, prev 6/1F017A70, desc: INSERT off 83 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017B00, prev 6/1F017AB8, desc: INSERT off 84 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017B48, prev 6/1F017B00, desc: INSERT off 85 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017B90, prev 6/1F017B48, desc: INSERT off 86 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017BD8, prev 6/1F017B90, desc: INSERT off 87 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017C20, prev 6/1F017BD8, desc: INSERT off 88 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017C68, prev 6/1F017C20, desc: INSERT off 89 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017CB0, prev 6/1F017C68, desc: INSERT off 90 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017CF8, prev 6/1F017CB0, desc: INSERT off 91 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017D40, prev 6/1F017CF8, desc: INSERT off 92 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017D88, prev 6/1F017D40, desc: INSERT off 93 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017DD0, prev 6/1F017D88, desc: INSERT off 94 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017E18, prev 6/1F017DD0, desc: INSERT off 95 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017E60, prev 6/1F017E18, desc: INSERT off 96 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017EA8, prev 6/1F017E60, desc: INSERT off 97 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017EF0, prev 6/1F017EA8, desc: INSERT off 98 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017F38, prev 6/1F017EF0, desc: INSERT off 99 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017F80, prev 6/1F017F38, desc: INSERT off 100 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F017FC8, prev 6/1F017F80, desc: INSERT off 101 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F018028, prev 6/1F017FC8, desc: INSERT off 102 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap len (rec/tot): 71/ 71, tx: 20329, lsn: 6/1F018070, prev 6/1F018028, desc: INSERT off 103 flags 0x08, blkref #0: rel 1663/13580/66363 blk 0
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20329, lsn: 6/1F0180B8, prev 6/1F018070, desc: NEW_CID rel 1663/13580/1259; tid 15/29; cmin: 4294967295, cmax: 1, combo: 4294967295
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20329, lsn: 6/1F0180F8, prev 6/1F0180B8, desc: NEW_CID rel 1663/13580/1259; tid 15/32; cmin: 1, cmax: 4294967295, combo: 4294967295
rmgr: Heap len (rec/tot): 123/ 123, tx: 20329, lsn: 6/1F018138, prev 6/1F0180F8, desc: UPDATE off 29 xmax 20329 flags 0x60 ; new off 32 xmax 0, blkref #0: rel 1663/13580/1259 blk 15
rmgr: Btree len (rec/tot): 64/ 64, tx: 20329, lsn: 6/1F0181B8, prev 6/1F018138, desc: INSERT_LEAF off 329, blkref #0: rel 1663/13580/2662 blk 2
rmgr: Btree len (rec/tot): 55/ 2519, tx: 20329, lsn: 6/1F0181F8, prev 6/1F0181B8, desc: INSERT_LEAF off 118, blkref #0: rel 1663/13580/2663 blk 7 FPW
rmgr: Btree len (rec/tot): 64/ 64, tx: 20329, lsn: 6/1F018BD0, prev 6/1F0181F8, desc: INSERT_LEAF off 280, blkref #0: rel 1663/13580/3455 blk 4
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20329, lsn: 6/1F018C10, prev 6/1F018BD0, desc: NEW_CID rel 1663/13580/1259; tid 15/31; cmin: 0, cmax: 1, combo: 0
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20329, lsn: 6/1F018C50, prev 6/1F018C10, desc: NEW_CID rel 1663/13580/1259; tid 15/33; cmin: 1, cmax: 4294967295, combo: 4294967295
rmgr: Heap len (rec/tot): 105/ 105, tx: 20329, lsn: 6/1F018C90, prev 6/1F018C50, desc: UPDATE off 31 xmax 20329 flags 0x60 ; new off 33 xmax 0, blkref #0: rel 1663/13580/1259 blk 15
rmgr: Btree len (rec/tot): 64/ 64, tx: 20329, lsn: 6/1F018D00, prev 6/1F018C90, desc: INSERT_LEAF off 345, blkref #0: rel 1663/13580/2662 blk 2
rmgr: Btree len (rec/tot): 80/ 80, tx: 20329, lsn: 6/1F018D40, prev 6/1F018D00, desc: INSERT_LEAF off 58, blkref #0: rel 1663/13580/2663 blk 5
rmgr: Btree len (rec/tot): 64/ 64, tx: 20329, lsn: 6/1F018D90, prev 6/1F018D40, desc: INSERT_LEAF off 279, blkref #0: rel 1663/13580/3455 blk 4
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20329, lsn: 6/1F018DD0, prev 6/1F018D90, desc: NEW_CID rel 1663/13580/1247; tid 11/18; cmin: 0, cmax: 2, combo: 1
rmgr: Heap len (rec/tot): 54/ 54, tx: 20329, lsn: 6/1F018E10, prev 6/1F018DD0, desc: DELETE off 18 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1247 blk 11
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20329, lsn: 6/1F018E48, prev 6/1F018E10, desc: NEW_CID rel 1663/13580/2608; tid 65/53; cmin: 0, cmax: 2, combo: 1
rmgr: Heap len (rec/tot): 54/ 54, tx: 20329, lsn: 6/1F018E88, prev 6/1F018E48, desc: DELETE off 53 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/2608 blk 65
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20329, lsn: 6/1F018EC0, prev 6/1F018E88, desc: NEW_CID rel 1663/13580/1247; tid 11/17; cmin: 0, cmax: 3, combo: 2
rmgr: Heap len (rec/tot): 54/ 54, tx: 20329, lsn: 6/1F018F00, prev 6/1F018EC0, desc: DELETE off 17 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1247 blk 11
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20329, lsn: 6/1F018F38, prev 6/1F018F00, desc: NEW_CID rel 1663/13580/2608; tid 65/52; cmin: 0, cmax: 3, combo: 2
rmgr: Heap len (rec/tot): 54/ 54, tx: 20329, lsn: 6/1F018F78, prev 6/1F018F38, desc: DELETE off 52 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/2608 blk 65
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20329, lsn: 6/1F018FB0, prev 6/1F018F78, desc: NEW_CID rel 1663/13580/1249; tid 64/17; cmin: 0, cmax: 4, combo: 3
rmgr: Heap len (rec/tot): 54/ 54, tx: 20329, lsn: 6/1F018FF0, prev 6/1F018FB0, desc: DELETE off 17 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1249 blk 64
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20329, lsn: 6/1F019028, prev 6/1F018FF0, desc: NEW_CID rel 1663/13580/1249; tid 64/16; cmin: 0, cmax: 4, combo: 3
rmgr: Heap len (rec/tot): 54/ 54, tx: 20329, lsn: 6/1F019068, prev 6/1F019028, desc: DELETE off 16 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1249 blk 64
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20329, lsn: 6/1F0190A0, prev 6/1F019068, desc: NEW_CID rel 1663/13580/1249; tid 64/15; cmin: 0, cmax: 4, combo: 3
rmgr: Heap len (rec/tot): 54/ 54, tx: 20329, lsn: 6/1F0190E0, prev 6/1F0190A0, desc: DELETE off 15 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1249 blk 64
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20329, lsn: 6/1F019118, prev 6/1F0190E0, desc: NEW_CID rel 1663/13580/1249; tid 64/14; cmin: 0, cmax: 4, combo: 3
rmgr: Heap len (rec/tot): 54/ 54, tx: 20329, lsn: 6/1F019158, prev 6/1F019118, desc: DELETE off 14 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1249 blk 64
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20329, lsn: 6/1F019190, prev 6/1F019158, desc: NEW_CID rel 1663/13580/1249; tid 64/13; cmin: 0, cmax: 4, combo: 3
rmgr: Heap len (rec/tot): 54/ 54, tx: 20329, lsn: 6/1F0191D0, prev 6/1F019190, desc: DELETE off 13 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1249 blk 64
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20329, lsn: 6/1F019208, prev 6/1F0191D0, desc: NEW_CID rel 1663/13580/1249; tid 64/12; cmin: 0, cmax: 4, combo: 3
rmgr: Heap len (rec/tot): 54/ 54, tx: 20329, lsn: 6/1F019248, prev 6/1F019208, desc: DELETE off 12 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1249 blk 64
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20329, lsn: 6/1F019280, prev 6/1F019248, desc: NEW_CID rel 1663/13580/1249; tid 64/10; cmin: 0, cmax: 4, combo: 3
rmgr: Heap len (rec/tot): 54/ 54, tx: 20329, lsn: 6/1F0192C0, prev 6/1F019280, desc: DELETE off 10 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1249 blk 64
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20329, lsn: 6/1F0192F8, prev 6/1F0192C0, desc: NEW_CID rel 1663/13580/1249; tid 64/11; cmin: 0, cmax: 4, combo: 3
rmgr: Heap len (rec/tot): 54/ 54, tx: 20329, lsn: 6/1F019338, prev 6/1F0192F8, desc: DELETE off 11 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1249 blk 64
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20329, lsn: 6/1F019370, prev 6/1F019338, desc: NEW_CID rel 1663/13580/1259; tid 15/33; cmin: 1, cmax: 4, combo: 4
rmgr: Heap len (rec/tot): 54/ 54, tx: 20329, lsn: 6/1F0193B0, prev 6/1F019370, desc: DELETE off 33 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/1259 blk 15
rmgr: Heap2 len (rec/tot): 60/ 60, tx: 20329, lsn: 6/1F0193E8, prev 6/1F0193B0, desc: NEW_CID rel 1663/13580/2608; tid 65/54; cmin: 0, cmax: 4, combo: 3
rmgr: Heap len (rec/tot): 54/ 54, tx: 20329, lsn: 6/1F019428, prev 6/1F0193E8, desc: DELETE off 54 flags 0x00 KEYS_UPDATED , blkref #0: rel 1663/13580/2608 blk 65
rmgr: Transaction len (rec/tot): 965/ 965, tx: 20329, lsn: 6/1F019460, prev 6/1F019428, desc: COMMIT 2022-03-04 06:11:22.603252 CST; rels: base/13580/66360; inval msgs: catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 50 catcache 49 catcache 75 catcache 74 catcache 75 catcache 74 catcache 50 catcache 49 catcache 50 catcache 49 catcache 75 catcache 74 catcache 75 catcache 74 catcache 50 catcache 49 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 catcache 7 catcache 6 relcache 66363 snapshot 2608 snapshot 2608 snapshot 2608 relcache 66338 relcache 66363 snapshot 2608 relcache 66363
I believe currently SET LOGGED rewrites the table using the WAL (essentially doing the whole operation), and rewrites the indexes.
在将表loggend后,会重新根据表的数据重新生成wal日志
COPY into tables that were created or truncated in the same transaction
通过copy写入数据可以跳过写入wal日志以及heap重写