File tree 1 file changed +1
-13
lines changed
ansible/files/admin_api_scripts/pg_upgrade_scripts
1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -427,13 +427,8 @@ $(cat /etc/postgresql/pg_hba.conf)" > /etc/postgresql/pg_hba.conf
427
427
cp " $POSTGRES_CONFIG_PATH " " $TMP_CONFIG "
428
428
429
429
# Check if max_slot_wal_keep_size exists in the config
430
- if grep -q " max_slot_wal_keep_size" " $TMP_CONFIG " ; then
431
- # Find and replace the existing setting
432
- sed -i ' s/^\s*max_slot_wal_keep_size\s*=.*$/max_slot_wal_keep_size = -1/' " $TMP_CONFIG "
433
- else
434
430
# Add the setting if not found
435
- echo " max_slot_wal_keep_size = -1" >> " $TMP_CONFIG "
436
- fi
431
+ echo " max_slot_wal_keep_size = -1" >> " $TMP_CONFIG "
437
432
438
433
# Remove db_user_namespace if upgrading from PG15
439
434
if [[ " $OLD_PGVERSION " =~ ^15.* && " $PGVERSION " =~ ^17.* ]]; then
479
474
sleep 3
480
475
systemctl stop postgresql
481
476
482
- # Additional check to ensure postgres is really stopped
483
- if [ -f " ${PGDATAOLD} /postmaster.pid" ]; then
484
- echo " PostgreSQL still running, forcing stop..."
485
- pid=$( head -n 1 " ${PGDATAOLD} /postmaster.pid" )
486
- kill -9 " $pid " || true
487
- rm -f " ${PGDATAOLD} /postmaster.pid"
488
- fi
489
477
else
490
478
CI_stop_postgres
491
479
fi
You can’t perform that action at this time.
0 commit comments