Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Patroni to 3.2.2 #971

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion postgres-appliance/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ COPY --from=dependencies-builder /builddeps/wal-g /usr/local/bin/
COPY build_scripts/patroni_wale.sh build_scripts/compress_build.sh /builddeps/

# Install patroni and wal-e
ENV PATRONIVERSION=3.1.2
ENV PATRONIVERSION=3.2.2
ENV WALE_VERSION=1.1.1

WORKDIR /
Expand Down
2 changes: 1 addition & 1 deletion postgres-appliance/bootstrap/maybe_pg_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def wait_end_of_recovery(postgresql):

for _ in polling_loop(postgresql.config.get('pg_ctl_timeout'), 10):
postgresql.reset_cluster_info_state(None)
if postgresql.is_leader():
if postgresql.is_primary():
break
logger.info('waiting for end of recovery of the old cluster')

Expand Down
2 changes: 1 addition & 1 deletion postgres-appliance/major_upgrade/inplace_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def do_upgrade(self):
self.cluster_version, self.desired_version)
return True

if not (self.postgresql.is_running() and self.postgresql.is_leader()):
if not (self.postgresql.is_running() and self.postgresql.is_primary()):
return logger.error('PostgreSQL is not running or in recovery')

cluster = self.dcs.get_cluster()
Expand Down
8 changes: 4 additions & 4 deletions postgres-appliance/major_upgrade/pg_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def set_bin_dir(self, version):

@property
def local_conn_kwargs(self):
conn_kwargs = self.config.local_connect_kwargs
conn_kwargs = self.connection_pool.conn_kwargs
conn_kwargs['options'] = '-c synchronous_commit=local -c statement_timeout=0 -c search_path='
conn_kwargs.pop('connect_timeout', None)
return conn_kwargs
Expand Down Expand Up @@ -195,10 +195,10 @@ def pg_upgrade(self, check=False):
def prepare_new_pgdata(self, version):
from spilo_commons import append_extensions

locale = self.query('SHOW lc_collate').fetchone()[0]
encoding = self.query('SHOW server_encoding').fetchone()[0]
locale = self.query('SHOW lc_collate')[0][0]
encoding = self.query('SHOW server_encoding')[0][0]
initdb_config = [{'locale': locale}, {'encoding': encoding}]
if self.query("SELECT current_setting('data_checksums')::bool").fetchone()[0]:
if self.query("SELECT current_setting('data_checksums')::bool")[0][0]:
initdb_config.append('data-checksums')

logger.info('initdb config: %s', initdb_config)
Expand Down
Loading