public inbox for [email protected]  
help / color / mirror / Atom feed
From: Kirill Reshke <[email protected]>
To: Álvaro Herrera <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Pg upgrade bug with NOT NULL NOT VALID
Date: Sat, 23 May 2026 15:14:42 +0500
Message-ID: <CALdSSPiTsw=t76-fiksBfjWKji4D2WHN8a17G30L5h1LF34oTA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CALdSSPgYCJu2AjUti9gnW9n7jfE-xZBDLA=n7N3JOQYCfUd+=g@mail.gmail.com>
	<[email protected]>

On Thu, 21 May 2026 at 22:18, Álvaro Herrera <[email protected]> wrote:
>
> Hi,
>

Hi, thank you for looking into this.

> 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. So, pg_dump will need to issue an
SQL that says: please create this relation, but also never choose
name1 to anything in the process. I guess this is not committable...
Maybe you can clarify the design here?

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

I also think we should make pg_upgrade just work in this case.



-- 
Best regards,
Kirill Reshke






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: <CALdSSPiTsw=t76-fiksBfjWKji4D2WHN8a17G30L5h1LF34oTA@mail.gmail.com>

* 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