Re: BUG #19928: pg_upgrade fails on v18 schema with NOT NULL ... NO INHERIT and inheritance

From: Alvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Raja Sai pranav <rajasaipranav0(at)gmail(dot)com>
Cc: exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19928: pg_upgrade fails on v18 schema with NOT NULL ... NO INHERIT and inheritance
Date: 2026-11-29 17:35:21
Message-ID: awxhiyHm2SI-iF2Y@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2026-Nov-27, Raja Sai pranav wrote:

> Here is a patch. pg_dump now makes each ancestor's NOT VALID not-null
> constraints depend on the child's own, so the child's command runs first
> and the parent's then merges into it, the same way the original schema
> was built. The restored catalog then matches the source: the child keeps
> its own constraint name, with conislocal = true and coninhcount = 1.

Hmm, I didn't verify the code in detail, but I wonder if it would be
possible to approach this fix better in flagInhAttrs()?

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"No es bueno caminar con un hombre muerto"

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Ishjaap Singh 2026-11-29 19:36:53 Re: BUG #19936: Planning is slower on 19.0 with many partial indexes on a SQL function
Previous Message Tom Lane 2026-11-29 17:30:26 Re: Removed left join leaves its key in the outer rel's target list