Re: t/035_standby_logical_decoding.pl might fail on attempt to read wrong timeline

From: Xuneng Zhou <xunengzhou(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Alexander Lakhin <exclusion(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: t/035_standby_logical_decoding.pl might fail on attempt to read wrong timeline
Date: 2026-06-12 06:28:23
Message-ID: CABPTF7V0CanEO71ZRoCAC3dva05kd2-hU0W6HDKqON=B78TFhA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 12, 2026 at 10:44 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Fri, Jun 12, 2026 at 08:57:05AM +0800, Xuneng Zhou wrote:
> > On Thu, Jun 11, 2026 at 9:15 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> >> read_local_xlog_page_guts() does not only impact SQL-callable logirep
> >> functions, even it is the spot that should be hit most of the time
> >> (again, the RecoveryInProgress() vs promotion window is super narrow).
> >> At quick glance, things are:
> >> - walinspect.
> >> - Slot advance.
> >> - Slot creation (?), but it feels even narrower.
> >
> > Yeah, it is used for two-phase commit as well. The usage of it is
> > broader than I observed before. Repack worker also make use of it.
>
> Repack workers cannot work on standbys, and for 2PC files we have the
> guarantee of a file on disk if the WAL is gone, so they should be
> basically irrelevant here. That's why I did not mention them. :)

Thanks for the clarification.

> Everything's now done. I was pondering about v14 and v15 for a bit
> for the second patch regarding pg_walinspect (or slot operations), but
> I could not get excited about these branches. pg_walinspect is less
> used, and slots have much more uses on standbys since v16~, so
> expanding that further down feels meh.

Making sense to me. This looks like a hard-to-hit issue on HEAD. The
likelihood of encountering it and the severity of damage caused by it
in those branches are expected to be even smaller.

--
Regards,
Xuneng Zhou
HighGo Software Co., Ltd.

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Michael Paquier 2026-06-12 06:05:46 Re: pg_restore handles extended statistics inconsistently with statistics data