From 0e0fd6599a99be743fd7945325903d2986426a97 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. --- 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 2216f21e4..df6947042 100755 --- a/src/test/regress/pg_regress_multi.pl +++ b/src/test/regress/pg_regress_multi.pl @@ -421,6 +421,15 @@ push(@pgOptions, "log_error_verbosity = 'verbose'"); # 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.max_adaptive_executor_pool_size=4");