| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Isaac Morland <isaac(dot)morland(at)gmail(dot)com> |
| Cc: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Order of tables dumped by pg_dump |
| Date: | 2026-05-16 17:25:29 |
| Message-ID: | 1508563.1778952329@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Isaac Morland <isaac(dot)morland(at)gmail(dot)com> writes:
> However, I didn't think to mention that the database is running 14.22 while
> the client pg_dump is 18.1.
Hmm, that might be relevant. However, I tried your example
both with current-HEAD server + current-HEAD pg_dump and
with 14.23 server + current-HEAD pg_dump. For me, the output
is stable across dump/reload except for the random \restrict keys.
I know that our handling of NOT NULL constraints changed significantly
in v18 and there have been multiple bug fixes in that area, so maybe
you'd have better luck with 18.4? I didn't spot any smoking guns in
a quick trawl of the commit log back to 18.1, but I might've been
searching for the wrong keywords.
> CREATE TABLE ijmorlan.test_child (
> NOT NULL f
> )
> INHERITS (ijmorlan.test_parent);
> The CREATE TABLE for test_child is not syntactically valid.
Yeah it is. The standalone constraint clause is perfectly fine,
the column declaration comes from the parent, and the primary
key constraint gets added on later (after loading data). In
any case, I think you'd have a hard time demonstrating a dump order
inconsistency with only two tables. If there is a problem here,
it'd likely require three or more somehow-related tables.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Dunstan | 2026-05-16 17:51:57 | Re: bump minimum supported version of psql and pg_{dump,dumpall,upgrade} to v10 |
| Previous Message | Hüseyin Demir | 2026-05-16 17:22:35 | Re: log_checkpoints: count WAL segment creations from all processes |