Re: BUG #19393: pg_upgrade fails with duplicate key violation when CHECK constraint named *_not_null exists

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: huseyin(dot)d3r(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19393: pg_upgrade fails with duplicate key violation when CHECK constraint named *_not_null exists
Date: 2026-02-05 16:52:50
Message-ID: 61c535617992fff830961ecc09a9c20096bc1f36.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Thu, 2026-02-05 at 15:58 +0100, I wrote:
> The bug is actually not in pg_upgrade, but in CREATE TABLE. The attached patch
> fixes the problem for me by avoiding given constraint names when generating
> the names for NOT NULL constraints.

... and here is v2, including a regression test.

Yours,
Laurenz Albe

Attachment Content-Type Size
v2-0001-Avoid-name-collision-with-NOT-NULL-constraints.patch text/x-patch 5.5 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2026-02-06 03:08:25 BUG #19395: Postgres master: undeclared function 'typeof_unqual'
Previous Message David G. Johnston 2026-02-05 15:31:40 Re: BUG #19394: error in ecpg

Browse pgsql-hackers by date

  From Date Subject
Next Message Nazir Bilal Yavuz 2026-02-05 16:56:24 Re: Don't synchronously wait for already-in-progress IO in read stream
Previous Message Andres Freund 2026-02-05 16:19:46 Re: pg_upgrade: transfer pg_largeobject_metadata's files when possible