Re: Add two missing tests in 035_standby_logical_decoding.pl - Mailing list pgsql-hackers

From Drouvot, Bertrand
Subject Re: Add two missing tests in 035_standby_logical_decoding.pl
Date
Msg-id 17b6b056-4f53-c444-0c94-869547d1a5df@gmail.com
Whole thread Raw
In response to RE: Add two missing tests in 035_standby_logical_decoding.pl  ("Yu Shi (Fujitsu)" <shiy.fnst@fujitsu.com>)
Responses Re: Add two missing tests in 035_standby_logical_decoding.pl
List pgsql-hackers
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
Attachment

pgsql-hackers by date:

Previous
From: Giuseppe Broccolo
Date:
Subject: Re: vector search support
Next
From: Tom Lane
Date:
Subject: Re: issue with meson builds on msys2