agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: Xuneng Zhou <xunengzhou@gmail.com>
Cc: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: t/035_standby_logical_decoding.pl might fail on attempt to read wrong timeline
Date: Mon, 8 Jun 2026 14:21:59 +0000
Message-ID: <aibQB2f9h3nYeg/2@bdtpg> (raw)
In-Reply-To: <CABPTF7U_B9pdC563fFONQLX_FXCZtxZgM+jN9snzMVg9b9MRfg@mail.gmail.com>
References: <7daef094-abf3-4672-bc23-3df4763b16a3@gmail.com>
<aiP/X1FThlZRCFiN@bdtpg>
<OS9PR01MB1214908BA67A7811BD6281208F51C2@OS9PR01MB12149.jpnprd01.prod.outlook.com>
<CABPTF7WmLKOJcSPod7zT2hynUFQcUs0VoQyR-p=XFsafvmGm7g@mail.gmail.com>
<CABPTF7U_B9pdC563fFONQLX_FXCZtxZgM+jN9snzMVg9b9MRfg@mail.gmail.com>
Hi,
On Mon, Jun 08, 2026 at 09:00:17PM +0800, Xuneng Zhou wrote:
> I tweaked the reproducer based on the theory outlined above. The main
> changes from the original reproducer are:
>
> 1) blocks at logical-walsender-after-slot-acquire in walsender.c,
> before the decoding context is created and before the reader starts
> from restart_lsn, matching the delay set by Alexander
> 2) Forces the first read to occur during promotion. It inserts rows
> 1..4, waits for replay, starts promotion with pg_promote(false), holds
> startup at startup-logical-decoding-status-change-end-of-recovery,
> then wakes the walsender.
Yeah, so this existing startup-logical-decoding-status-change-end-of-recovery
injection point already exists in the code tree and is also called after
CleanupAfterArchiveRecovery() and before RECOVERY_STATE_DONE change in
StartupXLOG().
So this is the same window as the new injection point that was added in the new
tests in v1-0002 shared up-thread [1].
That said, I think I prefer the v1-0002 shared up-thread [1] approach for the
tests as:
- the injection point name clearly describes the tested condition
- no new injection point is added in walsender.c (it pauses startup mid-promotion
and lets the walsender connect)
- the test relies on one injection point (not two)
[1]: https://postgr.es/m/aiaBtENl7tTf2MM8%40bdtpg
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
view thread (24+ messages) latest in thread
Message-ID: <aibQB2f9h3nYeg/2@bdtpg>
Permalink: ../aibQB2f9h3nYeg%2F2@bdtpg/
Also on: postgresql.org/message-id/aibQB2f9h3nYeg/2@bdtpg
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: pgsql-hackers@postgresql.org
Cc: bertranddrouvot.pg@gmail.com, xunengzhou@gmail.com, kuroda.hayato@fujitsu.com, exclusion@gmail.com
Subject: Re: t/035_standby_logical_decoding.pl might fail on attempt to read wrong timeline
In-Reply-To: <aibQB2f9h3nYeg/2@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