Re: New WAL record to detect the checkpoint redo location
Dilip Kumar <dilipbalaut@gmail.com>
From: Dilip Kumar <dilipbalaut@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Andres Freund <andres@anarazel.de>, Heikki Linnakangas <hlinnaka@iki.fi>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-08-17T07:41:50Z
Lists: pgsql-hackers
On Thu, Aug 17, 2023 at 10:52 AM Michael Paquier <michael@paquier.xyz> wrote: > > On Tue, Aug 15, 2023 at 02:23:43PM +0530, Dilip Kumar wrote: > > Yeah, good idea, actually we can do this insert outside of the > > exclusive insert lock and set the LSN of this insert as the > > checkpoint. redo location. So now we do not need to compute the > > checkpoint. redo based on the current insertion point we can directly > > use the LSN of this record. I have modified this and I have also > > moved some other code that is not required to be inside the WAL > > insertion lock. > > Looking at this patch, I am bit surprised to see that the redo point > maps with the end location of the CHECKPOINT_REDO record as it is the > LSN returned by XLogInsert(), not its start LSN. Yeah right, actually I was confused, I assumed it will return the start LSN of the record. And I do not see any easy way to identify the Start LSN of this record so maybe this solution will not work. I will have to think of something else. Thanks for pointing it out. -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com
Commits
-
During online checkpoints, insert XLOG_CHECKPOINT_REDO at redo point.
- afd12774ae89 17.0 landed
-
Unify two isLogSwitch tests in XLogInsertRecord.
- df9a3d4e9994 17.0 landed