From 49d1d1ddf9d9e88be3ea305fe08323c1ab838703 Mon Sep 17 00:00:00 2001 From: Arthur Petukhovsky Date: Thu, 27 Jan 2022 17:23:14 +0300 Subject: [PATCH] Don't call adjust_for_wal_acceptors after pg create (#1178) Now zenith_cli handles wal_acceptors config internally, and if we will append wal_acceptors to postgresql.conf in python tests, then it will contain duplicate wal_acceptors config. --- test_runner/fixtures/zenith_fixtures.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test_runner/fixtures/zenith_fixtures.py b/test_runner/fixtures/zenith_fixtures.py index c80eb35568..c161c577d0 100644 --- a/test_runner/fixtures/zenith_fixtures.py +++ b/test_runner/fixtures/zenith_fixtures.py @@ -1014,8 +1014,6 @@ class Postgres(PgProtocol): path = pathlib.Path('pgdatadirs') / 'tenants' / self.tenant_id / self.node_name self.pgdata_dir = os.path.join(self.env.repo_dir, path) - if self.env.safekeepers: - self.adjust_for_wal_acceptors(self.env.get_safekeeper_connstrs()) if config_lines is None: config_lines = [] self.config(config_lines) @@ -1072,7 +1070,9 @@ class Postgres(PgProtocol): # walproposer uses different application_name if ("synchronous_standby_names" in cfg_line or # don't ask pageserver to fetch WAL from compute - "callmemaybe_connstring" in cfg_line): + "callmemaybe_connstring" in cfg_line or + # don't repeat wal_acceptors multiple times + "wal_acceptors" in cfg_line): continue f.write(cfg_line) f.write("synchronous_standby_names = 'walproposer'\n")