Skip to content

Commit 6754a60

Browse files
committed
feat: rm oriole handling, refine 15 -> 17 config
1 parent 7a38abb commit 6754a60

File tree

1 file changed

+3
-3
lines changed
  • ansible/files/admin_api_scripts/pg_upgrade_scripts

1 file changed

+3
-3
lines changed

ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ POST_UPGRADE_EXTENSION_SCRIPT="/tmp/pg_upgrade/pg_upgrade_extensions.sql"
4343
POST_UPGRADE_POSTGRES_PERMS_SCRIPT="/tmp/pg_upgrade/pg_upgrade_postgres_perms.sql"
4444
OLD_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;")
5050
fi
@@ -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

0 commit comments

Comments
 (0)