diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2024-12-16 15:56:38 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2024-12-16 15:59:36 +0200 |
commit | f5f5e7b47351f0443d9720bfc7916ed2af940bd3 (patch) | |
tree | 61fa7eacce4225e2bce867c77a1919c9b7e960d7 | |
parent | 2a23dbcf35946b844699c65fdf2ee440251eab12 (diff) | |
download | postgresql-f5f5e7b47351f0443d9720bfc7916ed2af940bd3.tar.gz postgresql-f5f5e7b47351f0443d9720bfc7916ed2af940bd3.zip |
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 cbfbda7841. 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
-rw-r--r-- | src/test/recovery/t/009_twophase.pl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/recovery/t/009_twophase.pl b/src/test/recovery/t/009_twophase.pl index b9d96453167..a5686db2526 100644 --- a/src/test/recovery/t/009_twophase.pl +++ b/src/test/recovery/t/009_twophase.pl @@ -315,6 +315,7 @@ $cur_primary->psql('postgres', "COMMIT PREPARED 'xact_009_12'"); $cur_primary->psql( 'postgres', " + SET synchronous_commit='remote_apply'; -- To ensure the standby is caught up CREATE TABLE t_009_tbl_standby_mvcc (id int, msg text); BEGIN; INSERT INTO t_009_tbl_standby_mvcc VALUES (1, 'issued to ${cur_primary_name}'); |