Skip to content

Commit 5df1403

Browse files
committed
Add pg_upgrade ENABLE_SAME_CATVERSION_UPGRADES macro for testing to
allow upgrades of the same catalog version. (Doesn't work for tablespaces, as indicated by C comment.)
1 parent 604d4c4 commit 5df1403

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

contrib/pg_upgrade/check.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,10 @@ check_cluster_versions(void)
242242
* We can't allow downgrading because we use the target pg_dumpall, and
243243
* pg_dumpall cannot operate on new database versions, only older versions.
244244
*/
245+
#ifndef ENABLE_SAME_CATVERSION_UPGRADES /* does not allow tablespace upgrades */
245246
if (old_cluster.major_version > new_cluster.major_version)
246247
pg_log(PG_FATAL, "This utility cannot be used to downgrade to older major PostgreSQL versions.\n");
248+
#endif
247249

248250
/* get old and new binary versions */
249251
get_bin_version(&old_cluster);

0 commit comments

Comments
 (0)