Re: Corruption during WAL replay
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, deniel1495@mail.ru, Ibrar Ahmed <ibrar.ahmad@gmail.com>, tejeswarm@hotmail.com, hlinnaka <hlinnaka@iki.fi>, Masahiko Sawada <masahiko.sawada@2ndquadrant.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Daniel Wood <hexexpert@comcast.net>
Date: 2022-03-25T01:23:47Z
Lists: pgsql-hackers
Hi, On 2022-03-24 20:39:27 -0400, Robert Haas wrote: > But that leaves me even more confused. How can a change to only the server > code cause a client utility to fail to detect corruption that is being > created by Perl while the server is stopped? I guess it could somehow cause the first page to be all zeroes, in which case overwriting it with more zeroes wouldn't cause a problem that pg_checksums can see? But I have a somewhat more realistic idea: I'm suspicious of pg_checksums --filenode. If I understand correctly --filenode scans the data directory, including all tablespaces, for a file matching that filenode. If we somehow end up with a leftover file in the pre ALTER TABLE SET TABLESPACE location, it'd not notice that there *also* is a file in a different place? Perhaps the --filenode mode should print out the file location... Randomly noticed: The test fetches the block size without doing anything with it afaics. Andres
Commits
-
Harden TAP tests that intentionally corrupt page checksums.
- d09f765b9dcb 12.11 landed
- 6e9ffcf13a4a 13.7 landed
- 579cef5faf11 14.3 landed
- 3d263b09058a 11.16 landed
- 174877f1e344 15.0 landed
-
Fix possible recovery trouble if TRUNCATE overlaps a checkpoint.
- 412ad7a55639 15.0 landed
- 57f618310f83 10.21 landed
- 118f1a332b00 11.16 landed
- 3821d66a7b3e 12.11 landed
- 1ce14b6b2fe4 13.7 landed
- bbace5697df1 14.3 landed
-
Remember to reset yy_start state when firing up repl_scanner.l.
- ef9706bbc8ce 14.2 cited