pgsql: Fix test race between primary XLOG_RUNNING_XACTS and standby log

From: Noah Misch <noah(at)leadboat(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix test race between primary XLOG_RUNNING_XACTS and standby log
Date: 2024-02-19 20:57:02
Message-ID: E1rcAhC-00740f-2f@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix test race between primary XLOG_RUNNING_XACTS and standby logical slot.

Before the previous commit, the test could hang until
LOG_SNAPSHOT_INTERVAL_MS (15s), until checkpoint_timeout (300s), or
indefinitely. An indefinite hang was awfully improbable. It entailed
the test reaching checkpoint_timeout before the
DecodingContextFindStartpoint() of a CREATE SUBSCRIPTION, yet after the
preceding WAL record. Back-patch to v16, which introduced the test.

Bertrand Drouvot, reported by Noah Misch.

Discussion: https://postgr.es/m/20240211010227.a2.nmisch@google.com

Branch
------
REL_16_STABLE

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

Modified Files
--------------
src/test/perl/PostgreSQL/Test/Cluster.pm | 46 +++++++++++++++-------
.../recovery/t/035_standby_logical_decoding.pl | 4 +-
2 files changed, 34 insertions(+), 16 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message David Rowley 2024-02-19 23:49:55 pgsql: Fix incorrect pruning of NULL partition for boolean IS NOT claus
Previous Message Tom Lane 2024-02-19 19:18:02 pgsql: Doc: fix typo in SECURITY LABEL synopsis.