From 6b5510e8d64f9c76b1c24c46537d5a83a3483778 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Fri, 25 Nov 2011 14:35:43 -0500 Subject: [PATCH] Allow pg_upgrade to upgrade clusters that use exclusion contraints by fixing pg_dump to properly preserve such indexes. Backpatch to 9.1 and 9.0 (where the bug was introduced). --- src/bin/pg_dump/pg_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index b8809fe1e6..7a65091450 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -12708,7 +12708,7 @@ dumpConstraint(Archive *fout, ConstraintInfo *coninfo) exit_nicely(); } - if (binary_upgrade && !coninfo->condef) + if (binary_upgrade) binary_upgrade_set_pg_class_oids(q, indxinfo->dobj.catId.oid, true); appendPQExpBuffer(q, "ALTER TABLE ONLY %s\n", -- 2.40.0