File tree 2 files changed +4
-8
lines changed
ansible/files/admin_api_scripts/pg_upgrade_scripts
2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,8 @@ function cleanup {
22
22
23
23
ship_logs " $LOG_FILE " || true
24
24
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
29
27
30
28
# Restart postgres to apply any configuration changes
31
29
if [ -z " $IS_CI " ]; then
Original file line number Diff line number Diff line change @@ -397,10 +397,8 @@ function initiate_upgrade {
397
397
chown -R postgres:postgres " $MOUNT_POINT /"
398
398
rm -rf " ${PGDATANEW:? } /"
399
399
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
404
402
405
403
if [ " $IS_NIX_UPGRADE " = " true" ]; then
406
404
if [[ " $PGVERSION " =~ ^17.* || " $PGVERSION " == " 17-orioledb" ]]; then
You can’t perform that action at this time.
0 commit comments