public inbox for [email protected]
help / color / mirror / Atom feedFrom: Álvaro Herrera <[email protected]>
To: Kirill Reshke <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Pg upgrade bug with NOT NULL NOT VALID
Date: Sat, 23 May 2026 05:18:03 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <CALdSSPiTsw=t76-fiksBfjWKji4D2WHN8a17G30L5h1LF34oTA@mail.gmail.com>
On 2026-May-23, Kirill Reshke wrote:
> On Thu, 21 May 2026 at 22:18, Álvaro Herrera <[email protected]> wrote:
> > I see two alternatives. One is to have pg_dump --binary-upgrade choose
> > a constraint name for the not-null with full knowledge of all other
> > constraint names, so that we know to generate a non conflicting one.
> > I suspect this is not easy to code.
>
> Well, for this option, we need to be told about what other constraint
> names that are about to be created.
Sure. Of course, pg_dump can run all the queries it needs to obtain
constraint names, so it's certainly doable.
> > The other is much simpler: make pg_upgrade -c warn you about the check
> > constraint name so that you know to rename it before the upgrade.
>
> I don't think this is good when the database asks you to change your
> DDL because of its internal troubles with something.
OK. I disagree but I'm not opposed if you want to do it the other way.
If you prefer that I write the patch, that's fine too.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"La espina, desde que nace, ya pincha" (Proverbio africano)
reply
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: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Pg upgrade bug with NOT NULL NOT VALID
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox