Re: partitioned tables referenced by FKs
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2019-01-22T21:45:48Z
Lists: pgsql-hackers
Attachments
Hello, On 2019-Jan-21, Amit Langote wrote: > On 2018/12/01 4:12, Alvaro Herrera wrote: > > Here's a more credible version of this patch series. > > Are you going to post rebased patches soon? Yes, very soon -- right now, in fact :-) Two preliminary patches in this series are already pushed, per a nearby bugfix. I also split out the new index_get_partition routine to catalog/partition.c, per comment from Jesper, and put it on its own patch. 0003 is the interesting bits in this submission. Note that there is a change in constraint naming on partitions. This affects some preexisting test output ... and I'm not liking the changes much, anymore. I'll have a look about how to revert to the previous behavior. As you noticed in the other thread, the part of the FK clone routine that attaches to an existing constraint needed to be refactored into its own routine. I did that, though the split is different from what you were proposing. Jesper also mentioned removing the "#if 0" code. Actually what I need to be doing is reinstating that check in the cases where it's possible. I haven't done that yet. I also dropped the part that changed how psql reports constraints in \d, since there's a separate commitfest entry for that one. Hmm, I just noticed that there's an ereport that fails i18n by way of using a ternary operator in the first argument of errmsg. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Support foreign keys that reference partitioned tables
- f56f8f8da6af 12.0 landed
-
Fix partitioned index creation bug with dropped columns
- 7009f1a2df65 11.3 landed
- 126d63122232 12.0 landed
-
Improve psql's \d display of foreign key constraints
- 1af25ca0c2d9 12.0 cited
-
Fix dependency recording bug for partitioned PKs
- 7e7c57bbb2eb 12.0 landed
-
Add index_get_partition convenience function
- a6da0047158b 12.0 landed
-
Restore RI trigger sanity check
- 815b20ae0c6e 12.0 landed
- 04f9b449aa30 11.3 landed
-
Foreign keys on partitioned tables
- 3de241dba86f 11.0 cited