On Fri, Apr 03, 2026 at 01:10:08PM +0800, Adam Lee wrote:
> PATCH v2 removed the variable lastCheckPointEndPtr and refined the comments.
>
> Thanks for reviewing.
TBH, I am not convinced that this optimization in the control file is
worth it. minRecoveryPoint refers to a state where the on-disk pages
are all consistent based on their stored LSNs, see also the
cross-check that we do at the end of recovery in the event of
inconsistent pages. In most cases (say in the 99%-ish range), we will
have page flushes, making it non-relevant.
With time, I have also learnt the hard way that the less code paths
that update minRecoveryPoint in the control file, as well as the local
copies, the better. Simplifying this code is something we should try
to work on. Complicating it more has less value.
If we decide that this optimization is worth having, I am going to
request a TAP test to validate the behavior you'd expect out of it.
--
Michael