Fix pg_dump COMMENT dependency for separate domain constraints.

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 0858f0f96e.

Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Discussion: https://postgr.es/m/20250913020233.fa.nmisch@google.com
Backpatch-through: 13
REL_14_STABLE
Noah Misch 3 months ago
parent 295c0a644a
commit 85d6ed31fc
  1. 2
      src/bin/pg_dump/pg_dump.c

@ -17579,7 +17579,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);
}

Loading…
Cancel
Save