Re: partitioned tables referenced by FKs

Jesper Pedersen <jesper.pedersen@redhat.com>

From: Jesper Pedersen <jesper.pedersen@redhat.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2019-01-07T18:07:18Z
Lists: pgsql-hackers
Hi,

On 11/30/18 2:12 PM, Alvaro Herrera wrote:
> Here's a more credible version of this patch series.
> 

The patch series applies with hunks, and passes check-world.

No comments for 0001, 0002, 0003 and 0005.

While I'm still looking at 0004 - should we have a test that updates one 
of the constraints of fk to another partition in pk ?

I'll didn't try this yet with [1], so sending you a flamegraph of 
INSERTs off-list, since data loading takes a while during an OLTP based 
work load.

Thanks for working on this !

[1] https://commitfest.postgresql.org/21/1897/

Best regards,
  Jesper


Commits

  1. Support foreign keys that reference partitioned tables

  2. Fix partitioned index creation bug with dropped columns

  3. Improve psql's \d display of foreign key constraints

  4. Fix dependency recording bug for partitioned PKs

  5. Add index_get_partition convenience function

  6. Restore RI trigger sanity check

  7. Foreign keys on partitioned tables