File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
ansible/files/admin_api_scripts/pg_upgrade_scripts Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ POST_UPGRADE_EXTENSION_SCRIPT="/tmp/pg_upgrade/pg_upgrade_extensions.sql"
4343POST_UPGRADE_POSTGRES_PERMS_SCRIPT=" /tmp/pg_upgrade/pg_upgrade_postgres_perms.sql"
4444OLD_PGVERSION=$( pg_config --version | sed ' s/PostgreSQL \([0-9]*\.[0-9]*\).*/\1/' )
4545
46- # Skip locale settings if both versions are PostgreSQL 17+ or 17-orioledb
47- if ! [[ (( "$OLD_PGVERSION " =~ ^17 .* || " $OLD_PGVERSION " == " 17 - orioledb") && ( "$PGVERSION " =~ ^17 .* || " $PGVERSION " == " 17 - orioledb" )) ]]; then
46+ # Skip locale settings if both versions are PostgreSQL 17+
47+ if ! [[ " $OLD_PGVERSION " =~ ^17.* && " $PGVERSION " =~ ^17.* ]]; then
4848 SERVER_LC_COLLATE=$( run_sql -A -t -c " SHOW lc_collate;" )
4949 SERVER_LC_CTYPE=$( run_sql -A -t -c " SHOW lc_ctype;" )
5050fi
@@ -436,7 +436,7 @@ $(cat /etc/postgresql/pg_hba.conf)" > /etc/postgresql/pg_hba.conf
436436 fi
437437
438438 # Remove db_user_namespace if upgrading from PG15
439- if [[ " $OLD_PGVERSION " =~ ^15.* ]]; then
439+ if [[ " $OLD_PGVERSION " =~ ^15.* && " $PGVERSION " =~ ^17. * ]]; then
440440 sed -i ' /^db_user_namespace/d' " $TMP_CONFIG "
441441 fi
442442
You can’t perform that action at this time.
0 commit comments