File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
ansible/files/admin_api_scripts/pg_upgrade_scripts Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,8 @@ function cleanup {
2222
2323 ship_logs " $LOG_FILE " || true
2424
25- # Restore max_slot_wal_keep_size to 4096 only if both versions were PostgreSQL 17+
26- if [[ (" $OLD_PGVERSION " =~ ^17.* || " $OLD_PGVERSION " == " 17-orioledb" ) && (" $PGVERSION " =~ ^17.* || " $PGVERSION " == " 17-orioledb" ) ]]; then
27- sed -i ' s/max_slot_wal_keep_size = -1/max_slot_wal_keep_size = 4096/' /etc/postgresql/postgresql.conf
28- fi
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
2927
3028 # Restart postgres to apply any configuration changes
3129 if [ -z " $IS_CI " ]; then
Original file line number Diff line number Diff line change @@ -397,10 +397,8 @@ 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 upgrade only if both versions are PostgreSQL 17+
401- if [[ (" $OLD_PGVERSION " =~ ^17.* || " $OLD_PGVERSION " == " 17-orioledb" ) && (" $PGVERSION " =~ ^17.* || " $PGVERSION " == " 17-orioledb" ) ]]; then
402- sed -i ' s/max_slot_wal_keep_size = [0-9]*/max_slot_wal_keep_size = -1/' /etc/postgresql/postgresql.conf
403- fi
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
404402
405403 if [ " $IS_NIX_UPGRADE " = " true" ]; then
406404 if [[ " $PGVERSION " =~ ^17.* || " $PGVERSION " == " 17-orioledb" ]]; then
You can’t perform that action at this time.
0 commit comments