pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
To: Tender Wang <tndrwang@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Junwang Zhao <zhjwpku@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: Baehler Thomas SBB CFF FFS <thomas.baehler2@sbb.ch>
Cc: Guillaume Lelarge <guillaume@lelarge.info>
Cc: Michael Paquier <michael@paquier.xyz>
Subject: Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails
Date: Tue, 3 Sep 2024 11:26:37 +0200
Message-ID: <20240903112637.03752732@karst> (raw)
In-Reply-To: <CAHewXNk1RvFBPgVgL9PhC2szwMNKTqchZWF9HyN7EXzCuCY4zA@mail.gmail.com>
References: <20240820102651.273ecdf5@karst>
	<202408210309.d5q57gjclpcq@alvherre.pgsql>
	<20240902230147.0d3958bc@karst>
	<CAHewXNk1RvFBPgVgL9PhC2szwMNKTqchZWF9HyN7EXzCuCY4zA@mail.gmail.com>

Hi Tender,

On Tue, 3 Sep 2024 10:16:44 +0800
Tender Wang <tndrwang@gmail.com> wrote:

> Jehan-Guillaume de Rorthais <jgdr@dalibo.com> 于2024年9月3日周二 05:02写道:
[…]
> > * Constraint & trigger catalog cleanup [1] (this thread)
> > * FK broken after DETACH [2]
> > * Maintenance consideration about self referencing FK between partitions
> > [3]
> >  
> 
> The third issue has been fixed, and codes have been pushed.  Because of my
> misunderstanding,
> It should not be here.

I just retried the SQL scenario Guillaume gave on both master and master with
Alvaro's patch. See:

https://www.postgresql.org/message-id/flat/CAECtzeWHCA%2B6tTcm2Oh2%2Bg7fURUJpLZb-%3DpRXgeWJ-Pi%2BVU%...

It doesn't seem fixed at all. Maybe you are mixing up with another thread/issue?

> > 0. Splitting in two commits
> >
> >   […]
> >
> >   Unfortunately, this discussion about the first bug slipped to the second
> >   one when Tender stumbled on this bug as well and reported it. But, both
> >   bugs can be triggered independently, and have distinct fixes.
> 
> It's ok that these two issues are fixed together.  It is  because current
> codes don't handle better when the referenced side is the partition table.

I don't feel the same. Mixing two discussions and fixes together in the same
thread and commit makes life harder.

Last year, when you found the other bug, I tried to point you to the
right thread to avoid mixing subjects:

https://www.postgresql.org/message-id/20230810170345.26e41b05%40karst

If I wrote about the third (non fixed) issue yesterday, it's just because
Alvaro included a reference to it in his commit message. But I think we should
really keep up with this issue on its own, dedicated discussion:

https://www.postgresql.org/message-id/flat/CAECtzeWHCA%2B6tTcm2Oh2%2Bg7fURUJpLZb-%3DpRXgeWJ-Pi%2BVU%...

Regards





view thread (70+ messages)  latest in thread

Message-ID: <20240903112637.03752732@karst>
Permalink:  ../20240903112637.03752732@karst/
Also on:    postgresql.org/message-id/20240903112637.03752732@karst

 · 

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-hackers@postgresql.org
  Cc: jgdr@dalibo.com, tndrwang@gmail.com, alvherre@alvh.no-ip.org, zhjwpku@gmail.com, exclusion@gmail.com, thomas.baehler2@sbb.ch, guillaume@lelarge.info, michael@paquier.xyz
  Subject: Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails
  In-Reply-To: <20240903112637.03752732@karst>

* 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