On Thu, Aug 31, 2023 at 09:55:45AM +0530, Dilip Kumar wrote:
> Yeah, good catch.  With this, it seems like we can not move this new
> WAL Insert out of the Exclusive WAL insertion lock right?  Because if
> we want to set the LSN of this record as the checkpoint.redo then
> there should not be any concurrent insertion until we expose the
> XLogCtl->Insert.RedoRecPtr.  Otherwise, we will miss the FPW for all
> the record which has been inserted after the checkpoint.redo before
> we acquired the exclusive WAL insertion lock.

Yes.

> So maybe I need to restart from the first version of the patch but
> instead of moving the insertion of the new record out of the exclusive
> lock need to do some better refactoring so that XLogInsertRecord()
> doesn't look ugly.

Yes, I am not sure which interface would be less ugli-ish, but that's
enough material for a refactoring patch of the WAL insert routines on
top of the main patch that introduces the REDO record.
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to