Skip to content

Commit 5decf23

Browse files
committed
feat: if upgrade 17 -> 17 or 17-orioledb -> 17-orioledb do not run these queries
1 parent 60f8fda commit 5decf23

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ 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=$(run_sql -A -t -c "SHOW server_version;")
4545

46-
SERVER_LC_COLLATE=$(run_sql -A -t -c "SHOW lc_collate;")
47-
SERVER_LC_CTYPE=$(run_sql -A -t -c "SHOW lc_ctype;")
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
48+
SERVER_LC_COLLATE=$(run_sql -A -t -c "SHOW lc_collate;")
49+
SERVER_LC_CTYPE=$(run_sql -A -t -c "SHOW lc_ctype;")
50+
fi
51+
4852
SERVER_ENCODING=$(run_sql -A -t -c "SHOW server_encoding;")
4953

5054
POSTGRES_CONFIG_PATH="/etc/postgresql/postgresql.conf"

ansible/vars.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ postgres_major:
99

1010
# Full version strings for each major version
1111
postgres_release:
12-
postgresorioledb-17: "17.0.1.077-orioledb"
13-
postgres17: "17.4.1.027"
14-
postgres15: "15.8.1.084"
12+
postgresorioledb-17: "17.0.1.078-orioledb-upgrade-1"
13+
postgres17: "17.4.1.028-upgrade-1"
14+
postgres15: "15.8.1.085-upgrade-1"
1515

1616
# Non Postgres Extensions
1717
pgbouncer_release: "1.19.0"

0 commit comments

Comments
 (0)