pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@kurilemu.de>
To: Tender Wang <tndrwang@gmail.com>
Cc: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Cc: fastcat@gmail.com, pgsql-bugs@lists.postgresql.org, Christoph Berg <myon@debian.org>
Cc: PostgreSQL Developers <pgsql-hackers@postgresql.org>
Cc: Guillaume Lelarge <guillaume@lelarge.info>
Cc: Luca Vallisa <luca.vallisa@gmail.com>
Subject: Re: Issue attaching a table to a partitioned table with an auto-referenced foreign key
Date: Sat, 3 May 2025 15:09:23 +0200
Message-ID: <202505031309.f3pavc23a5b3@alvherre.pgsql> (raw)
In-Reply-To: <CAHewXNmXCiquhZbbr51XAW6GEXbUnRGfqv27B7TgLSPTS+i-kw@mail.gmail.com>

On 2025-May-01, Tender Wang wrote:

> Hmm.  I didn't get the same conclusion.
> Before commit 5914a22f6ea5, the issue reported by Luca could have happened.
[...]
> You can see from the above test that no error was reported.
> But if I revert the commit 614a406b4ff1,  above test would report error on
> v16devel:

Yeah, I was mistaken to blame 5914a22f6ea5 for this issue when the real
culprit was 614a406b4ff1.  Anyway, I pushed the proposed fix to all
branches last night, so hopefully it works correctly for all cases now. 

(As context -- it took me several weeks or months to get FKs on
partitioned tables to work.  People would make fun at the "spider"
diagrams I drew on whiteboards, of the relationships between
pg_constraint and pg_trigger entries.  And for some reason at no point
did the idea of self-referencing FKs occurred to me.  I should have
realized that the complexity was getting out of hand!  At the very least
I should have pressed for some more QA help.)

Y'all are still on time to test this a bit more before next week's
releases ... if I have made things even worse I can still revert the
patch.  With luck, that won't be necessary.

Regards

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"Java is clearly an example of money oriented programming"  (A. Stepanov)





view thread (5+ messages)  latest in thread

Message-ID: <202505031309.f3pavc23a5b3@alvherre.pgsql>
Permalink:  ../202505031309.f3pavc23a5b3@alvherre.pgsql/
Also on:    postgresql.org/message-id/202505031309.f3pavc23a5b3@alvherre.pgsql

 · 

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: pgsql-bugs@postgresql.org
  Cc: alvherre@kurilemu.de, tndrwang@gmail.com, jgdr@dalibo.com, myon@debian.org, pgsql-hackers@postgresql.org, guillaume@lelarge.info, luca.vallisa@gmail.com
  Subject: Re: Issue attaching a table to a partitioned table with an auto-referenced foreign key
  In-Reply-To: <202505031309.f3pavc23a5b3@alvherre.pgsql>

* 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