Hi,
On 4/26/23 11:58 AM, Yu Shi (Fujitsu) wrote:
> On Mon, Apr 24, 2023 8:07 PM Drouvot, Bertrand <bertranddrouvot.pg@gmail.com> wrote:
> I think that's because when replaying a checkpoint record, the startup process
> of standby only saves the information of the checkpoint, and we need to wait for
> the checkpointer to perform a restartpoint (see RecoveryRestartPoint), right? If
> so, could we force a checkpoint on standby? After this, the standby should have
> completed the restartpoint and we don't need to wait.
>
Thanks for looking at it!
Oh right, that looks like good a good way to ensure the WAL file is removed on the standby
so that we don't need to wait.
Implemented that way in V6 attached and that works fine.
> Besides, would it be better to wait for the cascading standby? If the wal log
> file needed for cascading standby is removed on the standby, the subsequent test
> will fail.
Good catch! I agree that we have to wait on the cascading standby before removing
the WAL files. It's done in V6 (and the test is not failing anymore if we set a
recovery_min_apply_delay to 5s on the cascading standby).
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com