From 043c3356aea3aa019b7b43354a9271942c8d1f20 Mon Sep 17 00:00:00 2001 From: Hadi Moshayedi Date: Fri, 15 Jan 2021 12:00:50 -0800 Subject: [PATCH] Faster logical replication tests. Logical replication status can take wal_receiver_status_interval seconds to get updated. Default is 10s, which means tests in which logical replication is used can take a long time to finish. We reduce it to 1 second to speed these tests up. Logical replication apply launcher launches workers every wal_retrieve_retry_interval, so if we have many shard moves with logical replication consecutively, they will be throttled by this parameter. Default is 5s, we reduce it to 1s so we finish tests faster. (cherry picked from commit 0e0fd6599a99be743fd7945325903d2986426a97) --- src/test/regress/pg_regress_multi.pl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/test/regress/pg_regress_multi.pl b/src/test/regress/pg_regress_multi.pl index e7065bd29..1ffbb47d0 100755 --- a/src/test/regress/pg_regress_multi.pl +++ b/src/test/regress/pg_regress_multi.pl @@ -418,6 +418,15 @@ push(@pgOptions, "max_parallel_workers_per_gather=0"); # Allow CREATE SUBSCRIPTION to work push(@pgOptions, "wal_level='logical'"); +# Faster logical replication status update so tests with logical replication +# run faster +push(@pgOptions, "wal_receiver_status_interval=1"); + +# Faster logical replication apply worker launch so tests with logical +# replication run faster. This is used in ApplyLauncherMain in +# src/backend/replication/logical/launcher.c. +push(@pgOptions, "wal_retrieve_retry_interval=1000"); + # Citus options set for the tests push(@pgOptions, "citus.shard_count=4"); push(@pgOptions, "citus.shard_max_size=1500kB");