Commit 5df1403b authored by Bruce Momjian's avatar Bruce Momjian

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.)
parent 604d4c4c
...@@ -242,8 +242,10 @@ check_cluster_versions(void) ...@@ -242,8 +242,10 @@ check_cluster_versions(void)
* We can't allow downgrading because we use the target pg_dumpall, and * We can't allow downgrading because we use the target pg_dumpall, and
* pg_dumpall cannot operate on new database versions, only older versions. * pg_dumpall cannot operate on new database versions, only older versions.
*/ */
#ifndef ENABLE_SAME_CATVERSION_UPGRADES /* does not allow tablespace upgrades */
if (old_cluster.major_version > new_cluster.major_version) if (old_cluster.major_version > new_cluster.major_version)
pg_log(PG_FATAL, "This utility cannot be used to downgrade to older major PostgreSQL versions.\n"); pg_log(PG_FATAL, "This utility cannot be used to downgrade to older major PostgreSQL versions.\n");
#endif
/* get old and new binary versions */ /* get old and new binary versions */
get_bin_version(&old_cluster); get_bin_version(&old_cluster);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment