diff options
| author | Noah Misch | 2024-02-19 20:52:28 +0000 |
|---|---|---|
| committer | Noah Misch | 2024-02-19 20:52:28 +0000 |
| commit | 0e162810df7657bac24ba4657460a87104523fc6 (patch) | |
| tree | 02e301cce7e513926a6d78fe2c2c769ffc7a9e93 /src/test/recovery | |
| parent | 4791f87f34bd3a055db34519d6f878afeedd2548 (diff) | |
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
Diffstat (limited to 'src/test/recovery')
| -rw-r--r-- | src/test/recovery/t/035_standby_logical_decoding.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/recovery/t/035_standby_logical_decoding.pl b/src/test/recovery/t/035_standby_logical_decoding.pl index b020361b297..0710bccc176 100644 --- a/src/test/recovery/t/035_standby_logical_decoding.pl +++ b/src/test/recovery/t/035_standby_logical_decoding.pl @@ -465,8 +465,8 @@ $psql_subscriber{subscriber_stdin} .= "\n"; $psql_subscriber{run}->pump_nb(); -# Speed up the subscription creation -$node_primary->safe_psql('postgres', "SELECT pg_log_standby_snapshot()"); +# Log the standby snapshot to speed up the subscription creation +$node_primary->log_standby_snapshot($node_standby, 'tap_sub'); # Explicitly shut down psql instance gracefully - to avoid hangs # or worse on windows |
