On Tue, Mar 2, 2021 at 9:01 PM Dilip Kumar <dilipbal...@gmail.com> wrote:
> > > > We don't want that to happen in cases where previous > > recovery-end-checkpoint is > > skipped in startup. We want Checkpointer first to convey the barrier to all > > backends but, the backend shouldn't write wal until the Checkpointer writes > > recovery-end-checkpoint record. > > > > To refrain these backends from writing WAL I think we should keep the > > server in > > crash recovery mode until UpdateFullPageWrites(), > > end-of-recovery-checkpoint, and XLogReportParameters() are performed. I did not read the code for this, but let me ask something about this case. Why do we want checkpointer to convey the barrier to all the backend before completing the end of recovery checkpoint and other stuff? Is it because the system is still in WAL prohibited state? Is it possible that as soon as we get the pg_prohibit_wal(false) request the receiving backend start allowing the WAL writing for itself and finish the all post-recovery pending work and then inform the checkpointer to inform all other backends? -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com