On 6/05/2023 1:06 am, Thomas Munro wrote: > Next can you share the file base/1414389/2662? ("5" was from the wrong > database.) Right - I should have realised that! base/1414389/2662 is indeed all nulls, 32KB of them. I included the file anyway in https://objective.realityexists.net/temp/pgstuff2.zip > Try something like: > pg_waldump -R 1663/1414389/2662 -F main 000000010000000000000001 > 000000010000000000000007 > > ... but change that to the range of files you have in your pg_wal. The PG server had only 2 files left from today, and pg_waldumping them gave this error: pg_waldump -R 1663/1414389/2662 -F main 00000001000000650000005E 00000001000000650000005F pg_waldump: error: error in WAL record at 65/5F629838: invalid record length at 65/5F62A1E0: wanted 24, got 0 Not sure if that's something to worry about or not! Then I realised we're actually archiving our WAL files with pgBackRest, retrieved the WAL files for the time the DB was created and used (~12:39 UTC on 2023-05-02) and re-ran pg_waldump on those. pg_waldump -R 1663/1414389/2662 -F main 000000010000005B00000000 000000010000005B0000000F rmgr: XLOG len (rec/tot): 51/ 108, tx: 242382, lsn: 5B/0222BC68, prev 5B/0222BC38, desc: FPI , blkref #0: rel 1663/1414389/2662 blk 0 FPW rmgr: XLOG len (rec/tot): 51/ 3224, tx: 242382, lsn: 5B/0222BCD8, prev 5B/0222BC68, desc: FPI , blkref #0: rel 1663/1414389/2662 blk 1 FPW rmgr: XLOG len (rec/tot): 51/ 1544, tx: 242382, lsn: 5B/0222C988, prev 5B/0222BCD8, desc: FPI , blkref #0: rel 1663/1414389/2662 blk 2 FPW rmgr: XLOG len (rec/tot): 49/ 121, tx: 242382, lsn: 5B/0222CF90, prev 5B/0222C988, desc: FPI , blkref #0: rel 1663/1414389/2662 blk 3 FPW rmgr: Btree len (rec/tot): 64/ 64, tx: 242384, lsn: 5B/02321870, prev 5B/023217A0, desc: INSERT_LEAF off 132, blkref #0: rel 1663/1414389/2662 blk 2 rmgr: Btree len (rec/tot): 64/ 64, tx: 242384, lsn: 5B/02322640, prev 5B/02322570, desc: INSERT_LEAF off 133, blkref #0: rel 1663/1414389/2662 blk 2 ... (many more entries like that) pg_waldump: error: error in WAL record at 5B/FFFFF38: missing contrecord at 5B/FFFFF70 The full output is also in https://objective.realityexists.net/temp/pgstuff2.zip