Re: Corruption during WAL replay
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>,
Ibrar Ahmed <ibrar.ahmad@gmail.com>, tejeswarm@hotmail.com, Andres Freund <andres@anarazel.de>,
hlinnaka <hlinnaka@iki.fi>, Masahiko Sawada <masahiko.sawada@2ndquadrant.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Daniel Wood <hexexpert@comcast.net>
Date: 2021-09-24T20:08:44Z
Lists: pgsql-hackers
On Fri, Sep 24, 2021 at 3:42 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Robert Haas <robertmhaas@gmail.com> writes: > > I like this patch. > > I think the basic idea is about right, but I'm not happy with the > three-way delayChkpt business; that seems too cute by three-quarters. > I think two independent boolean flags, one saying "I'm preventing > checkpoint start" and one saying "I'm preventing checkpoint completion", > would be much less confusing and also more future-proof. Who's to say > that we won't ever need both states to be set in the same process? Nobody, but the version of the patch that I was looking at uses a separate bit for each one: +/* symbols for PGPROC.delayChkpt */ +#define DELAY_CHKPT_START (1<<0) +#define DELAY_CHKPT_COMPLETE (1<<1) One could instead use separate Booleans, but there doesn't seem to be anything three-way about this? -- Robert Haas EDB: http://www.enterprisedb.com
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