public inbox for [email protected]
help / color / mirror / Atom feedFrom: Bertrand Drouvot <[email protected]>
To: Hayato Kuroda (Fujitsu) <[email protected]>
Cc: Alexander Lakhin <[email protected]>
Cc: [email protected] <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: t/035_standby_logical_decoding.pl might fail on attempt to read wrong timeline
Date: Tue, 9 Jun 2026 06:03:28 +0000
Message-ID: <aiessEw9U8r8fs7L@bdtpg> (raw)
In-Reply-To: <aiaBtENl7tTf2MM8@bdtpg>
References: <[email protected]>
<aiP/X1FThlZRCFiN@bdtpg>
<OS9PR01MB1214908BA67A7811BD6281208F51C2@OS9PR01MB12149.jpnprd01.prod.outlook.com>
<aiaBtENl7tTf2MM8@bdtpg>
Hi,
On Mon, Jun 08, 2026 at 08:47:48AM +0000, Bertrand Drouvot wrote:
> Attached:
>
> 0001: To fix this race
>
> Fix by checking GetWALInsertionTimeLineIfSet() when RecoveryInProgress()
> returns true. If InsertTimeLineID is already set (non-zero), the new timeline is
> established and we use it directly, avoiding attempts to read from segments that
> may have been removed.
>
> 0002: Adding a test in 035_standby_logical_decoding.pl
>
> It makes use of a new injection point "promotion-after-wal-segment-cleanup" in
> StartupXLOG(), right after CleanupAfterArchiveRecovery() removes old timeline
> WAL segments but before SharedRecoveryState is set to RECOVERY_STATE_DONE.
>
> The test fails without the fix in 0001 so it also somehow proves that the
> diagnostic is right.
>
> 0003: Apply the same timeline fix to read_local_xlog_page_guts()
>
> Indeed, it could hit the same race as mentioned by Xuneng-San.
>
> 0004: Add a test for 0003
Re-attaching v1 patches here to have the cfbot focusing on those.
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
view thread (24+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: t/035_standby_logical_decoding.pl might fail on attempt to read wrong timeline
In-Reply-To: <aiessEw9U8r8fs7L@bdtpg>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox