Skip to content

Commit 9e6b7b4

Browse files
committed
Fix timing issue in deadlock recovery conflict test.
Per buildfarm members longfin and skink. Discussion: https://postgr.es/m/20220413002626.udl7lll7f3o7nre7@alap3.anarazel.de Backpatch: 10-
1 parent c40ba5f commit 9e6b7b4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/test/recovery/t/031_recovery_conflict.pl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,14 @@
226226
$sect = "startup deadlock";
227227
$expected_conflicts++;
228228

229+
# Want to test recovery deadlock conflicts, not buffer pin conflicts. Without
230+
# changing max_standby_streaming_delay it'd be timing dependent what we hit
231+
# first
232+
$node_standby->adjust_conf('postgresql.conf', 'max_standby_streaming_delay',
233+
"${PostgreSQL::Test::Utils::timeout_default}s");
234+
$node_standby->restart();
235+
reconnect_and_clear();
236+
229237
# Generate a few dead rows, to later be cleaned up by vacuum. Then acquire a
230238
# lock on another relation in a prepared xact, so it's held continuously by
231239
# the startup process. The standby psql will block acquiring that lock while
@@ -281,6 +289,9 @@
281289

282290
# clean up for next tests
283291
$node_primary->safe_psql($test_db, qq[ROLLBACK PREPARED 'lock';]);
292+
$node_standby->adjust_conf('postgresql.conf', 'max_standby_streaming_delay', '50ms');
293+
$node_standby->restart();
294+
reconnect_and_clear();
284295

285296

286297
# Check that expected number of conflicts show in pg_stat_database. Needs to

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy