agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix another instability in recovery TAP test 004_timeline_switch
Date: Tue, 16 Jun 2026 23:42:47 +0000
Message-ID: <E1wZdQd-000ds5-2M@gemulon.postgresql.org> (raw)

Fix another instability in recovery TAP test 004_timeline_switch

The test did not wait for the standby to be connected to the primary.
This breaks one assumption at the beginning of the test, where the
primary is stopped to ensure that all its records are flushed to both
standbys before moving on with its next steps.

If standby_1 finishes ahead of standby_2, the test would be able work
fine as the former waits for the latter.  The opposite is not true,
standby_2 getting ahead of standby_1 would cause the test to fail on
timeout when standby_1 attempts to connect to standby_2.

This commit adds an additional polling query after the two standbys are
started, checking that both standbys are connected to the primary before
processing with the initial steps of the test.

Like 7185eddf0522, backpatch down to v14.

Author: Sergey Tatarintsev <s.tatarintsev@postgrespro.ru>
Reviewed-by: Ewan Young <kdbase.hack@gmail.com>
Discussion: https://postgr.es/m/fea4190e-f8b5-4432-a52d-bcbee5f34366@postgrespro.ru
Backpatch-through: 14

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d75146456fa5ebcb50a084cd4e2db61ab108c233

Modified Files
--------------
src/test/recovery/t/004_timeline_switch.pl | 4 ++++
1 file changed, 4 insertions(+)



view thread (6+ messages)

Message-ID: <E1wZdQd-000ds5-2M@gemulon.postgresql.org>
Permalink:  ../E1wZdQd-000ds5-2M@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wZdQd-000ds5-2M@gemulon.postgresql.org

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-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix another instability in recovery TAP test 004_timeline_switch
  In-Reply-To: <E1wZdQd-000ds5-2M@gemulon.postgresql.org>

* 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