Hi Shihao,

Thanks for working on this. I can reproduce it, and your patch fixes it.

On 03.12.26 05:09, shihao zhong wrote:
> Hi hackers,
> 
> While reviewing Jan's patch [1], I found that a standby can write pages
> newer than its minRecoveryPoint.
> [...]
> The attached patch clears the flag only in the startup process, and
> adds a TAP test.

The two patches work together without any conflicts. Each test fails
only if its own fix is missing, and both the recovery and pg_rewind
suites pass when both patches are applied.

However, in one case my patch [1] relies on yours. When a crashed
primary is restarted as a standby, the checkpointer can clear
updateMinRecoveryPoint during crash recovery. This means the
UpdateMinRecoveryPoint() call added by my patch at the shutdown
restartpoint has no effect in that situation. I tested this setup, and
the node is only rewound when both patches are present.

[1] https://postgr.es/m/[email protected]

Best regards
  Jan

-- 
Jan Nidzwetzki
PlanetScale



Reply via email to