Re: Corruption during WAL replay
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: deniel1495@mail.ru
Cc: robertmhaas@gmail.com, ibrar.ahmad@gmail.com, tejeswarm@hotmail.com,
andres@anarazel.de, hlinnaka@iki.fi, masahiko.sawada@2ndquadrant.com,
pgsql-hackers@postgresql.org, hexexpert@comcast.net
Date: 2022-01-26T08:25:33Z
Lists: pgsql-hackers
Attachments
At Mon, 24 Jan 2022 23:33:20 +0300, Daniel Shelepanov <deniel1495@mail.ru> wrote in
> Hi. This is my first attempt to review a patch so feel free to tell me
> if I missed something.
Welcome!
> As of today's state of REL_14_STABLE
> (ef9706bbc8ce917a366e4640df8c603c9605817a), the problem is
> reproducible using the script provided by Daniel Wood in this
> (1335373813.287510.1573611814107@connect.xfinity.com) message. Also,
> the latest patch seems not to be applicable and requires some minor
> tweaks.
Thanks for the info. The reason for my failure is checksum was
enabled.. After disalbing both fpw and checksum (and wal_log_hints)
allows me to reproduce the issue. And what I found is:
v3 patch:
> vxids = GetVirtualXIDsDelayingChkpt(&nvxids, DELAY_CHKPT_COMPLETE);
!> if (0 && nvxids > 0)
> {
Ugggggggh! It looks like a debugging tweak but it prevents everything
from working.
The attached is the fixed version and it surely works with the repro.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
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