Skip to content

Commit 3ec9818

Browse files
committed
fix: Better to override that during the upgrade process by specifying the option directly when pg_upgrade is executed (-c)
1 parent 11dab86 commit 3ec9818

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

ansible/files/admin_api_scripts/pg_upgrade_scripts/complete.sh

-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ function cleanup {
2222

2323
ship_logs "$LOG_FILE" || true
2424

25-
# Restore max_slot_wal_keep_size to 4096 after binary upgrade
26-
sed -i 's/max_slot_wal_keep_size = -1/max_slot_wal_keep_size = 4096/' /etc/postgresql/postgresql.conf
27-
2825
# Restart postgres to apply any configuration changes
2926
if [ -z "$IS_CI" ]; then
3027
systemctl restart postgresql

ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh

+3-4
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,6 @@ function initiate_upgrade {
397397
chown -R postgres:postgres "$MOUNT_POINT/"
398398
rm -rf "${PGDATANEW:?}/"
399399

400-
# Change max_slot_wal_keep_size to -1 for binary upgrade
401-
sed -i 's/max_slot_wal_keep_size = [0-9]*/max_slot_wal_keep_size = -1/' /etc/postgresql/postgresql.conf
402-
403400
if [ "$IS_NIX_UPGRADE" = "true" ]; then
404401
if [[ "$PGVERSION" =~ ^17.* || "$PGVERSION" == "17-orioledb" ]]; then
405402
LC_ALL=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LANG=en_US.UTF-8 LOCALE_ARCHIVE=/usr/lib/locale/locale-archive su -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && $PGBINNEW/initdb --encoding=$SERVER_ENCODING --locale-provider=icu --icu-locale=en_US.UTF-8 -L $PGSHARENEW -D $PGDATANEW/ --username=supabase_admin" -s "$SHELL" postgres
@@ -430,8 +427,10 @@ $(cat /etc/postgresql/pg_hba.conf)" > /etc/postgresql/pg_hba.conf
430427
--jobs="${WORKERS}" -r \
431428
--old-options='-c config_file=${POSTGRES_CONFIG_PATH}' \
432429
--old-options="-c shared_preload_libraries='${SHARED_PRELOAD_LIBRARIES}'" \
430+
--old-options="-c max_slot_wal_keep_size=-1" \
433431
--new-options="-c data_directory=${PGDATANEW}" \
434-
--new-options="-c shared_preload_libraries='${SHARED_PRELOAD_LIBRARIES}'"
432+
--new-options="-c shared_preload_libraries='${SHARED_PRELOAD_LIBRARIES}'" \
433+
--new-options="-c max_slot_wal_keep_size=-1"
435434
EOF
436435
)
437436

ansible/vars.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ postgres_major:
99

1010
# Full version strings for each major version
1111
postgres_release:
12-
postgresorioledb-17: "17.0.1.078-orioledb-upgrade-4"
13-
postgres17: "17.4.1.028-upgrade-4"
14-
postgres15: "15.8.1.085-upgrade-4"
12+
postgresorioledb-17: "17.0.1.078-orioledb-upgrade-5"
13+
postgres17: "17.4.1.028-upgrade-5"
14+
postgres15: "15.8.1.085-upgrade-5"
1515

1616
# Non Postgres Extensions
1717
pgbouncer_release: "1.19.0"

0 commit comments

Comments
 (0)