Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails
Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
From: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Tender Wang <tndrwang@gmail.com>, Junwang Zhao <zhjwpku@gmail.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Alexander
Lakhin <exclusion@gmail.com>, Guillaume Lelarge <guillaume@lelarge.info>,
Michael Paquier <michael@paquier.xyz>
Date: 2024-09-26T08:48:35Z
Lists: pgsql-hackers
Attachments
On Wed, 25 Sep 2024 16:14:07 +0200 Jehan-Guillaume de Rorthais <jgdr@dalibo.com> wrote: > On Wed, 25 Sep 2024 14:42:40 +0200 > Jehan-Guillaume de Rorthais <jgdr@dalibo.com> wrote: > > > On Thu, 5 Sep 2024 00:57:28 +0200 > > Jehan-Guillaume de Rorthais <jgdr@dalibo.com> wrote: > […] > > > > > > Please, find in attachment a patch implementing this idea. > > > > Please, find in attachment a set of patch based on the previous one. > > Please, find in attachment the same set of patch for REL_17_STABLE. The set of patch for REL_17_STABLE apply on REL_16_STABLE with no effort. I've been able to backpatch on REL_15_STABLE with minimal effort. See attachments. REL_14_STABLE backport doesn't seem trivial, so I'll wait for some feedback, review & decision before going further down in backpatching. Regards,
Commits
-
Fix some more bugs in foreign keys connecting partitioned tables
- f7d510a38245 16.5 landed
- 936ab6de9595 17.1 landed
- 2d5fe514052a 18.0 landed
- 1b216fceffe3 15.9 landed
-
Restructure foreign key handling code for ATTACH/DETACH
- d20194cead75 13.17 landed
- 5d83bad6b87d 15.9 landed
- 5914a22f6ea5 17.1 landed
- 53af9491a043 18.0 landed
- 46a8c27a7226 14.14 landed
- 2aaf2a28b87e 16.5 landed
-
Create foreign key triggers in partitioned tables too
- f4566345cf40 15.0 cited