Re: Corruption during WAL replay
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>, Daniel Gustafsson <daniel@yesql.se>, 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-25T06:07:37Z
Lists: pgsql-hackers
Hi, On 2022-03-25 01:38:45 -0400, Tom Lane wrote: > Andres Freund <andres@anarazel.de> writes: > > Not sure what to do here... I guess we can just change the value we overwrite > > the page with and hope to not hit this again? But that feels deeply deeply > > unsatisfying. > > AFAICS, this strategy of whacking a predetermined chunk of the page with > a predetermined value is going to fail 1-out-of-64K times. Yea. I suspect that the way the modifications and checksumming are done are actually higher chance than 1/64k. But even it actually is 1/64k, it's not great to wait for (#animals * #catalog-changes) to approach a decent percentage of 1/64k. I'm was curious whether there have been similar issues in the past. Querying the buildfarm logs suggests not, at least not in the pg_checksums test. > We have to change the test so that it's guaranteed to produce an invalid > checksum. Inverting just the checksum field, without doing anything else, > would do that ... but that feels pretty unsatisfying too. We really ought to find a way to get to wider checksums :/ Greetings, Andres Freund
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