aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2022-08-22 13:26:52 +0200
committerPeter Eisentraut <peter@eisentraut.org>2022-08-22 13:26:52 +0200
commitf0b013b0fc0a53de0ffe610b403125affb9c6094 (patch)
tree05f16f03b800bd976999011d2f6a33cca3537c1b /src
parent64ef572c068fde7cbba7f82cd50f51c0131ffe3b (diff)
downloadpostgresql-f0b013b0fc0a53de0ffe610b403125affb9c6094.tar.gz
postgresql-f0b013b0fc0a53de0ffe610b403125affb9c6094.zip
pg_upgrade: Fix thinko in database info acquisition routine
When checking whether the major version supports per-database locale providers, it was always looking at the version of the old cluster instead of the cluster that was passed in. This would lead to failures to detect locale provider mismatches. Reported-by: Marina Polyakova <m.polyakova@postgrespro.ru> Reviewed-by: Julien Rouhaud <rjuju123@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/f385ba25e7f8be427b8c582e5cca7d79%40postgrespro.ru#515a31c5429d6d37ad1d5c9d66962a1e
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_upgrade/info.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/pg_upgrade/info.c b/src/bin/pg_upgrade/info.c
index df374ce4b36..53ea348e211 100644
--- a/src/bin/pg_upgrade/info.c
+++ b/src/bin/pg_upgrade/info.c
@@ -319,7 +319,7 @@ get_db_infos(ClusterInfo *cluster)
snprintf(query, sizeof(query),
"SELECT d.oid, d.datname, d.encoding, d.datcollate, d.datctype, ");
- if (GET_MAJOR_VERSION(old_cluster.major_version) < 1500)
+ if (GET_MAJOR_VERSION(cluster->major_version) < 1500)
snprintf(query + strlen(query), sizeof(query) - strlen(query),
"'c' AS datlocprovider, NULL AS daticulocale, ");
else