From: Noah Misch <noah@leadboat.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Melanie Plageman <melanieplageman@gmail.com>
Cc: gonzalemario@gmail.com
Cc: dbryan.green@gmail.com
Cc: euler@eulerto.com
Cc: pgsql-hackers@postgresql.org
Subject: Re: pg_get_*_ddl() needs a redesign
Date: Fri, 11 Sep 2026 06:35:52 -0700
Message-ID: <20260911133552.42.noahmisch@microsoft.com> (raw)
In-Reply-To: <CA+TgmoZ-QFzYfo2FsPA+wjV9ddSaGWGHdiX=X6kR1zTngV4yCQ@mail.gmail.com>
References: <20260827015242.54.noahmisch@microsoft.com>
<CAAKRu_a0KX2OONvtcEOwyOX0DzOC-B8sh-w8s5tNkKwczmVzeQ@mail.gmail.com>
<c75aa91a-7029-4c69-9f98-fe4d2f18bc11@dunslane.net>
<20260909172132.0a.noahmisch@microsoft.com>
<640139.1788975299@sss.pgh.pa.us>
<ccd76a86-51c0-4395-b6b2-2e7214c2fbf2@dunslane.net>
<20260910035953.59.noahmisch@microsoft.com>
<CA+Tgmoa2aBFUREeN1AWZ9O8h5WjTD0wdwAzDJj4c3j5aOP=eTA@mail.gmail.com>
<20260911052649.e3.noahmisch@microsoft.com>
<CA+TgmoZ-QFzYfo2FsPA+wjV9ddSaGWGHdiX=X6kR1zTngV4yCQ@mail.gmail.com>
On Fri, Sep 11, 2026 at 08:24:50AM -0400, Robert Haas wrote:
> On Fri, Sep 11, 2026 at 1:27 AM Noah Misch <noah@leadboat.com> wrote:
> > > I think we would do well to confine all of our present conversations,
> > > insofar as it is possible to do so, to whether any given feature
> > > contains defects incompatible with shipping it.
> >
> > The defects are the reason not to ship this implementation. One of those
> > defects, the inability to restore in dependency order, cannot be fixed without
> > redesigning the current SQL-facing API. That is the reason not to ship this
> > design. See my original post of this thread for details.
>
> I saw that, but that seems like you're questioning the feature's
> choice of scope as much as its actual merits.
That is not the case.
> I suppose the idea was
> that this feature is for getting the definition of an individual
> object for possible cloning into this database or some other where the
> prerequisites are already present. If the feature had the intention of
> allowing for full-database restoration and failed to do so, that's a
> code defect. Otherwise, it isn't.
The first discussion linked from the 76e514e commit message, [1], described
the "main use case" as "dumping role definitions for migration or backup
purposes without needing pg_dumpall". My review findings are about failures
that arise when using the feature as part of a migration.
[1] https://postgr.es/m/4c5f895e-3281-48f8-b943-9228b7da6471@gmail.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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: noah@leadboat.com, robertmhaas@gmail.com, andrew@dunslane.net, tgl@sss.pgh.pa.us, melanieplageman@gmail.com, gonzalemario@gmail.com, dbryan.green@gmail.com, euler@eulerto.com
Subject: Re: pg_get_*_ddl() needs a redesign
In-Reply-To: <20260911133552.42.noahmisch@microsoft.com>
References: <20260827015242.54.noahmisch@microsoft.com> <CAAKRu_a0KX2OONvtcEOwyOX0DzOC-B8sh-w8s5tNkKwczmVzeQ@mail.gmail.com> <c75aa91a-7029-4c69-9f98-fe4d2f18bc11@dunslane.net> <20260909172132.0a.noahmisch@microsoft.com> <640139.1788975299@sss.pgh.pa.us> <ccd76a86-51c0-4395-b6b2-2e7214c2fbf2@dunslane.net> <20260910035953.59.noahmisch@microsoft.com> <CA+Tgmoa2aBFUREeN1AWZ9O8h5WjTD0wdwAzDJj4c3j5aOP=eTA@mail.gmail.com> <20260911052649.e3.noahmisch@microsoft.com> <CA+TgmoZ-QFzYfo2FsPA+wjV9ddSaGWGHdiX=X6kR1zTngV4yCQ@mail.gmail.com> <20260911133552.42.noahmisch@microsoft.com>
* 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