From 4128cba6286a2cd394edbe59c321bf4f555abc66 Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Tue, 26 Jun 2018 13:48:16 +0100 Subject: [PATCH] max_worker_processes parameter was introduced only in 9.4 (#724) exclude it from the list on 9.3 when building effective configuration --- patroni/postgresql.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/patroni/postgresql.py b/patroni/postgresql.py index e8e240eb..2e6e9b07 100644 --- a/patroni/postgresql.py +++ b/patroni/postgresql.py @@ -835,11 +835,13 @@ class Postgresql(object): OPTIONS_MAPPING = { 'max_connections': 'max_connections setting', - 'max_worker_processes': 'max_worker_processes setting', 'max_prepared_transactions': 'max_prepared_xacts setting', 'max_locks_per_transaction': 'max_locks_per_xact setting' } + if self._major_version >= 90400: + OPTIONS_MAPPING['max_worker_processes'] = 'max_worker_processes setting' + data = self.controldata() effective_configuration = self._server_parameters.copy()