Re: Add checkpoint and redo LSN to LogCheckpointEnd log message
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: masao.fujii@oss.nttdata.com
Cc: bharath.rupireddyforpostgres@gmail.com, nathandbossart@gmail.com,
sfrost@snowman.net, bossartn@amazon.com, rjuju123@gmail.com,
michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
Date: 2022-02-14T05:40:22Z
Lists: pgsql-hackers
Attachments
At Fri, 11 Feb 2022 01:00:03 +0900, Fujii Masao <masao.fujii@oss.nttdata.com> wrote in > > > On 2022/02/09 11:52, Kyotaro Horiguchi wrote: > > 0001: The fix of CreateRestartPoint > > This patch might be ok for the master branch. But since concurrent > checkpoint and restartpoint can happen in v14 or before, we would need > another patch based on that assumption, for the backport. How about > fixing the bug all the branches at first, then apply this patch in the > master to improve the code? For backbranches, the attached for pg14 does part of the full patch. Of the following, I think we should do (a) and (b) to make future backpatchings easier. a) Use RedoRecPtr and PriorRedoPtr after they are assigned. b) Move assignment to PriorRedoPtr into the ControlFileLock section. c) Skip udpate of minRecoveryPoint only when the checkpoint gets old. d) Skip call to UpdateCheckPointDistanceEstimate() when RedoRecPtr <= PriorRedoPtr. # Mmm. The v9-0001 contains a silly mistake here.. Still I'm not sure whether that case really happens and how checkpoint behaves *after* that happenes, but at least it protects database from the possible unrecoverable state due to the known issue here.. It doesn't apply even on pg13 (due to LSN_FORMAT_ARGS). I will make the per-version patches if you are fine with this. regards. regards. -- Kyotaro Horiguchi NTT Open Source Software Center
Commits
-
Add checkpoint and REDO LSN to log_checkpoints message.
- 62c46eee2279 16.0 landed