Re: 004_timeline_switch TAP test may fail

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Ewan Young <kdbase.hack@gmail.com>
Cc: Sergey Tatarintsev <s.tatarintsev@postgrespro.ru>, pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-06-16T23:31:23Z
Lists: pgsql-hackers
On Tue, Jun 16, 2026 at 06:51:48PM +0800, Ewan Young wrote:
> One small thing: the rest of this file uses count(*), so I'd write count(*) = 2
> rather than count(1) = 2 just for local consistency. And the comment reads a
> little better as something like "Wait until both standbys have
> connected to the primary",
> since by this point they've already started -- what we're waiting for is the
> connection.

Both queries work the same for this purpose, so any of them is fine.
The comment needs to be refined a bit, though.
--
Michael

Commits

  1. Fix another instability in recovery TAP test 004_timeline_switch

  2. Fix rare instability in recovery TAP test 004_timeline_switch