Skip to content

Commit

Permalink
Drop pg_repack extension before major upgrade (#646)
Browse files Browse the repository at this point in the history
and enable wal_compression by default (it is a must when running with page checksums)
  • Loading branch information
CyberDem0n authored Oct 8, 2021
1 parent f2b1876 commit 30977cc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion postgres-appliance/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion postgres-appliance/major_upgrade/pg_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
1 change: 1 addition & 0 deletions postgres-appliance/scripts/configure_spilo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 30977cc

Please sign in to comment.