diff --git a/patroni/postgresql.py b/patroni/postgresql.py index fc7956e9..263b58ce 100644 --- a/patroni/postgresql.py +++ b/patroni/postgresql.py @@ -379,7 +379,7 @@ recovery_target_timeline = 'latest' data = subprocess.check_output(['pg_controldata', self.data_dir]) if data: data = data.splitlines() - result = {l.split(':')[0]: l.split(':')[1].strip() for l in data if l} + result = {l.split(':')[0].replace('Current ', '', 1): l.split(':')[1].strip() for l in data if l} except subprocess.CalledProcessError: logger.exception("Error when calling pg_controldata") finally: diff --git a/tests/test_postgresql.py b/tests/test_postgresql.py index e5e2dfd4..b402626a 100644 --- a/tests/test_postgresql.py +++ b/tests/test_postgresql.py @@ -118,12 +118,12 @@ Backup start location: 0/0 Backup end location: 0/0 End-of-backup record required: no wal_level setting: hot_standby -wal_log_hints setting: on -max_connections setting: 100 -max_worker_processes setting: 8 -max_prepared_xacts setting: 0 -max_locks_per_xact setting: 64 -track_commit_timestamp setting: off +Current wal_log_hints setting: on +Current max_connections setting: 100 +Current max_worker_processes setting: 8 +Current max_prepared_xacts setting: 0 +Current max_locks_per_xact setting: 64 +Current track_commit_timestamp setting: off Maximum data alignment: 8 Database block size: 8192 Blocks per segment of large relation: 131072