Skip to content

Commit e438b0f

Browse files
committed
Make 009_twophase.pl test pass with recovery_min_apply_delay set
The test failed if you ran the regression tests with TEMP_CONFIG with recovery_min_apply_delay = '500ms'. Fix the race condition by waiting for transaction to be applied in the replica, like in a few other tests. The failing test was introduced in commit cbfbda7. Backpatch to all supported versions like that commit (except v12, which is no longer supported). Reported-by: Alexander Lakhin Discussion: https://www.postgresql.org/message-id/09e2a70a-a6c2-4b5c-aeae-040a7449c9f2@gmail.com
1 parent ec0dc2c commit e438b0f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/test/recovery/t/009_twophase.pl

+1
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ sub configure_and_reload
312312

313313
$cur_master->psql(
314314
'postgres', "
315+
SET synchronous_commit='remote_apply'; -- To ensure the standby is caught up
315316
CREATE TABLE t_009_tbl_standby_mvcc (id int, msg text);
316317
BEGIN;
317318
INSERT INTO t_009_tbl_standby_mvcc VALUES (1, 'issued to ${cur_master_name}');

0 commit comments

Comments
 (0)