summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund2017-04-04 21:38:00 +0000
committerAndres Freund2017-04-04 21:38:00 +0000
commitbae9b8016053c0a434690add7049a9216afef7e2 (patch)
tree23a205281602d0d63d138277cad0d499b2bcf7bf
parent490e9a98ff964df95311e2b5a68a15f63bce0cfd (diff)
Force synchronous commit in new-ish test_decoding test.
This was missed in a924c327 ff.
-rw-r--r--contrib/test_decoding/expected/slot.out3
-rw-r--r--contrib/test_decoding/sql/slot.sql5
2 files changed, 8 insertions, 0 deletions
diff --git a/contrib/test_decoding/expected/slot.out b/contrib/test_decoding/expected/slot.out
index 6dee1436cc..9f5f8a9b76 100644
--- a/contrib/test_decoding/expected/slot.out
+++ b/contrib/test_decoding/expected/slot.out
@@ -1,3 +1,5 @@
+-- predictability
+SET synchronous_commit = on;
SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot_p', 'test_decoding');
?column?
----------
@@ -31,6 +33,7 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot_t2', 'tes
-- here we want to start a new session and wait till old one is gone
select pg_backend_pid() as oldpid \gset
\c -
+SET synchronous_commit = on;
do 'declare c int = 0;
begin
while (select count(*) from pg_replication_slots where active_pid = '
diff --git a/contrib/test_decoding/sql/slot.sql b/contrib/test_decoding/sql/slot.sql
index 7ca83feac5..fa9561f54e 100644
--- a/contrib/test_decoding/sql/slot.sql
+++ b/contrib/test_decoding/sql/slot.sql
@@ -1,3 +1,6 @@
+-- predictability
+SET synchronous_commit = on;
+
SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot_p', 'test_decoding');
SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot_t', 'test_decoding', true);
@@ -9,6 +12,8 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot_t2', 'tes
-- here we want to start a new session and wait till old one is gone
select pg_backend_pid() as oldpid \gset
\c -
+SET synchronous_commit = on;
+
do 'declare c int = 0;
begin
while (select count(*) from pg_replication_slots where active_pid = '