Re: Another FK violation when referencing a multi-level partitioned table

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>, pgsql-bugs@lists.postgresql.org
Date: 2020-02-06T17:21:55Z
Lists: pgsql-bugs
On 2020-Feb-06, Michael Paquier wrote:

> On Thu, Feb 06, 2020 at 12:49:48AM +0100, Jehan-Guillaume de Rorthais wrote:
> > Please, find in attachment a proposal patch to fix this FK violation.
> 
> Indeed.  I would have expected the deletion of the referenced rows to
> happen as in your test.  At quick glance, your fix looks right, but I
> need to study more this code.  Alvaro, would you like to weigh in as
> the author of f56f8f8?

Sure, I'll have a look at this this afternoon.

Kindly do CC me when mentioning me in messages.  I don't read every
mailing list message ...

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Commits

  1. Simplify FK-to-partitioned regression test query

  2. Fix failure to create FKs correctly in partitions