Re: t/035_standby_logical_decoding.pl might fail on attempt to read wrong timeline
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Xuneng Zhou <xunengzhou@gmail.com>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>, "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>, Alexander Lakhin <exclusion@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2026-06-12T02:44:47Z
Lists: pgsql-hackers
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@paquier.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. :) 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. -- Michael
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