diff options
author | Andres Freund <andres@anarazel.de> | 2022-05-04 12:50:38 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2022-05-04 12:50:38 -0700 |
commit | 9e6b7b45ca92cccd6b870fa4e0a98059a86ce79d (patch) | |
tree | 0e352da3bf481ed5aeede2104a20fa19df8f3279 /src | |
parent | c40ba5f318f96a6a5a29729b987ead11c5dc65c1 (diff) | |
download | postgresql-9e6b7b45ca92cccd6b870fa4e0a98059a86ce79d.tar.gz postgresql-9e6b7b45ca92cccd6b870fa4e0a98059a86ce79d.zip |
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-
Diffstat (limited to 'src')
-rw-r--r-- | src/test/recovery/t/031_recovery_conflict.pl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/recovery/t/031_recovery_conflict.pl b/src/test/recovery/t/031_recovery_conflict.pl index 192d2d5a31d..8dcb3da0de9 100644 --- a/src/test/recovery/t/031_recovery_conflict.pl +++ b/src/test/recovery/t/031_recovery_conflict.pl @@ -226,6 +226,14 @@ check_conflict_stat("tablespace"); $sect = "startup deadlock"; $expected_conflicts++; +# Want to test recovery deadlock conflicts, not buffer pin conflicts. Without +# changing max_standby_streaming_delay it'd be timing dependent what we hit +# first +$node_standby->adjust_conf('postgresql.conf', 'max_standby_streaming_delay', + "${PostgreSQL::Test::Utils::timeout_default}s"); +$node_standby->restart(); +reconnect_and_clear(); + # Generate a few dead rows, to later be cleaned up by vacuum. Then acquire a # lock on another relation in a prepared xact, so it's held continuously by # the startup process. The standby psql will block acquiring that lock while @@ -281,6 +289,9 @@ check_conflict_stat("deadlock"); # clean up for next tests $node_primary->safe_psql($test_db, qq[ROLLBACK PREPARED 'lock';]); +$node_standby->adjust_conf('postgresql.conf', 'max_standby_streaming_delay', '50ms'); +$node_standby->restart(); +reconnect_and_clear(); # Check that expected number of conflicts show in pg_stat_database. Needs to |