Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8ff2b9f

Browse files
committed
Test: stabilize 039.log_backend_messages test.
In the test a query is sent to standby server right after rows are inserted into primary server. Due to a replication lag, the inserted rows could not be found on the standby in slower machines. This commit tries to fix the issue by using synchronous replication with remote_apply option. Backpatch-through: v4.2
1 parent d6ddc60 commit 8ff2b9f

File tree

1 file changed

+5
-1
lines changed
  • src/test/regression/tests/039.log_backend_messages

1 file changed

+5
-1
lines changed

src/test/regression/tests/039.log_backend_messages/test.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,20 @@ do
2323

2424
echo > result
2525

26-
# We set backend_weight0 to 0 to send ready queries to backend 1.
26+
# We set backend_weight0 to send read queries to backend 1.
2727
# We set client_min_messages to log so that log messages appear on
2828
# the client screen.
2929
# We set connection_cache to off so that each time client connects
3030
# to pgpool, it receives ready for query from backend.
31+
# We set synchronous_commit = remote_apply, and synchronous_standby_names = 'server1'
32+
# so that updation to primary is replicated to standby with no lag.
3133
cat >> etc/pgpool.conf <<EOF
3234
backend_weight0 = 0
3335
client_min_messages = log
3436
log_per_node_statement = off
3537
connection_cache = off
38+
synchronous_commit = remote_apply
39+
synchronous_standby_names = 'server1'
3640
EOF
3741
for option in none terse verbose
3842
do

0 commit comments

Comments
 (0)