Re: t/035_standby_logical_decoding.pl might fail on attempt to read wrong timeline
Xuneng Zhou <xunengzhou@gmail.com>
From: Xuneng Zhou <xunengzhou@gmail.com>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
Cc: Alexander Lakhin <exclusion@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2026-06-09T06:13:54Z
Lists: pgsql-hackers
On Tue, Jun 9, 2026 at 1:57 PM Bertrand Drouvot <bertranddrouvot.pg@gmail.com> wrote: > > Hi Hayato-san, > > On Tue, Jun 09, 2026 at 04:04:20AM +0000, Hayato Kuroda (Fujitsu) wrote: > > Dear Bertrand, Xuneng, > > > > Thanks for sharing the reproducer and opinion. I could now understand. > > > > While seeing, I felt the same issue can happen even for the streaming case. > > Please see attached reproducer and possible fix. Good catch! > I just had a quick look and I feel that's probably an issue too (good find!). > I think that your fix should use GetWALInsertionTimeLineIfSet() though (but I > only did a quick scan on your patch). > > > Can you also include that point? Or this thread discusses only for the logical case? > > If separated, I can take initiative for the streaming part, after the logical decoding > > case. > > I would says it's probably better to keep this thread focusing on Alexander's issue > (logical decoding). Once this thread is fixed, then I'd suggest to open a dedicated > thread for the streaming one (mentioning this thread and probably trying to mimic > its fix as close as possible). > +1 for starting a dedicated thread. Please CC me in that thread in case I miss it. -- Regards, Xuneng Zhou HighGo Software Co., Ltd.
Commits
-
Fix second race with timeline selection during promotion
- d9b49e5b4fc2 16 (unreleased) landed
- ab5334d8bfa2 17 (unreleased) landed
- 4bff3aa51c19 18 (unreleased) landed
- a8ee70bd5e00 19 (unreleased) landed
-
Remove TAP test for timeline lookup race with logical decoding on standbys
- c011d5b65457 17 (unreleased) landed
-
Fix race with timeline selection in logical decoding during promotion
- 8cd687c44b62 16 (unreleased) landed
- 16b89ff04839 17 (unreleased) landed
- b4bd1385043c 18 (unreleased) landed
- eb4e7224a1c6 19 (unreleased) landed
-
Backport GetWALInsertionTimeLineIfSet()
- 2a04624daa32 16 (unreleased) landed
-
TAP test for logical decoding on standby
- fcd77d53217b 16.0 cited