On Thu, Aug 17, 2023 at 10:52 AM Michael Paquier <mich...@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