From c044b50d199cf592eba2ac84f48cf0fcb5fb65f8 Mon Sep 17 00:00:00 2001 From: Noah Misch Date: Tue, 16 Sep 2025 09:40:44 -0700 Subject: Fix pg_dump COMMENT dependency for separate domain constraints. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The COMMENT should depend on the separately-dumped constraint, not the domain. Sufficient restore parallelism might fail the COMMENT command by issuing it before the constraint exists. Back-patch to v13, like commit 0858f0f96ebb891c8960994f023ed5a17b758a38. Reviewed-by: Álvaro Herrera Discussion: https://postgr.es/m/20250913020233.fa.nmisch@google.com Backpatch-through: 13 --- 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 802637fb24e..9fc3671cb35 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -18796,7 +18796,7 @@ dumpConstraint(Archive *fout, const ConstraintInfo *coninfo) dumpComment(fout, conprefix->data, qtypname, tyinfo->dobj.namespace->dobj.name, tyinfo->rolname, - coninfo->dobj.catId, 0, tyinfo->dobj.dumpId); + coninfo->dobj.catId, 0, coninfo->dobj.dumpId); destroyPQExpBuffer(conprefix); free(qtypname); } -- cgit v1.2.3