From 30977cc4bb041dcf2d461d39e109eef4d377272f Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Fri, 8 Oct 2021 16:14:27 +0200 Subject: [PATCH] Drop pg_repack extension before major upgrade (#646) and enable wal_compression by default (it is a must when running with page checksums) --- postgres-appliance/Dockerfile | 2 +- postgres-appliance/major_upgrade/pg_upgrade.py | 2 +- postgres-appliance/scripts/configure_spilo.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/postgres-appliance/Dockerfile b/postgres-appliance/Dockerfile index ee97097ab..5f61b787b 100644 --- a/postgres-appliance/Dockerfile +++ b/postgres-appliance/Dockerfile @@ -81,7 +81,7 @@ ARG DEB_PG_SUPPORTED_VERSIONS="$PGOLDVERSIONS $PGVERSION" # Install PostgreSQL, extensions and contribs ENV POSTGIS_VERSION=3.1 \ POSTGIS_LEGACY=3.1 \ - BG_MON_COMMIT=1f3461dda893c14778c02b5968d4c83a5d4d8e7d \ + BG_MON_COMMIT=b81800d9d45d112ef402eca7588d24364198417b \ PG_AUTH_MON_COMMIT=437435b4e2de32a820e86973f6934ec849a768e0 \ PG_MON_COMMIT=54fbdcc3cfe7e2a626bd96dda644d9a0c6866b58 \ DECODERBUFS=v.1.3.1.Final \ diff --git a/postgres-appliance/major_upgrade/pg_upgrade.py b/postgres-appliance/major_upgrade/pg_upgrade.py index 1b67164db..35fd93446 100644 --- a/postgres-appliance/major_upgrade/pg_upgrade.py +++ b/postgres-appliance/major_upgrade/pg_upgrade.py @@ -96,7 +96,7 @@ def drop_possibly_incompatible_objects(self): logger.info('Executing "DROP FUNCTION metric_helpers.pg_stat_statements" in the database="%s"', d) cur.execute("DROP FUNCTION IF EXISTS metric_helpers.pg_stat_statements(boolean) CASCADE") - for ext in ('pg_stat_kcache', 'pg_stat_statements') + self._INCOMPATIBLE_EXTENSIONS: + for ext in ('pg_stat_kcache', 'pg_stat_statements', 'pg_repack') + self._INCOMPATIBLE_EXTENSIONS: logger.info('Executing "DROP EXTENSION IF EXISTS %s" in the database="%s"', ext, d) cur.execute("DROP EXTENSION IF EXISTS {0}".format(ext)) diff --git a/postgres-appliance/scripts/configure_spilo.py b/postgres-appliance/scripts/configure_spilo.py index 9c3a09152..9754ee608 100755 --- a/postgres-appliance/scripts/configure_spilo.py +++ b/postgres-appliance/scripts/configure_spilo.py @@ -202,6 +202,7 @@ def deep_update(a, b): archive_timeout: 1800s wal_level: hot_standby wal_log_hints: 'on' + wal_compression: 'on' max_wal_senders: 10 max_connections: {{postgresql.parameters.max_connections}} max_replication_slots: 10