Re: Add two missing tests in 035_standby_logical_decoding.pl

From: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: "Yu Shi (Fujitsu)" <shiy(dot)fnst(at)fujitsu(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add two missing tests in 035_standby_logical_decoding.pl
Date: 2023-04-26 14:23:06
Message-ID: 17b6b056-4f53-c444-0c94-869547d1a5df@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)pg(at)gmail(dot)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 Content-Type Size
v6-0001-Add-retained-WAL-test-in-035_standby_logical_deco.patch text/plain 3.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-04-26 14:32:34 Re: issue with meson builds on msys2
Previous Message Andrew Dunstan 2023-04-26 13:59:05 issue with meson builds on msys2