From: Álvaro Herrera <alvherre@kurilemu.de>
To: Noah Misch <noah@leadboat.com>
Cc: jian he <jian.universality@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: pg_dump does not dump domain not-null constraint's comments
Date: Sat, 13 Sep 2025 13:59:29 +0200
Message-ID: <202509131159.p74ngjfov4l6@alvherre.pgsql> (raw)
In-Reply-To: <20250913020233.fa.nmisch@google.com>
On 2025-Sep-12, Noah Misch wrote:
> The last argument gives the dump object on which the comment has a dependency.
> Since this is the case of a separately-dumped constraint, the comment needs to
> depend on that constraint (coninfo), not on the domain (tyinfo):
>
> - coninfo->dobj.catId, 0, tyinfo->dobj.dumpId);
> + coninfo->dobj.catId, 0, coninfo->dobj.dumpId);
>
> I didn't encounter a failure from this, but sufficient restore parallelism
> might reach a failure. A failure would look like a "does not exist" error in
> the COMMENT command, due to the constraint not yet existing.
> dumpTableConstraintComment() is an older case that optimally handles the last
> dumpComment() arg.
Sounds sane.
> In the absence of objections, I'll make it so.
Please do, thanks.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@kurilemu.de, noah@leadboat.com, jian.universality@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: pg_dump does not dump domain not-null constraint's comments
In-Reply-To: <202509131159.p74ngjfov4l6@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox