Re: partitioned tables referenced by FKs - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: partitioned tables referenced by FKs
Date
Msg-id 201901222145.t6wws6t6vrcu@alvherre.pgsql
Whole thread Raw
In response to Re: partitioned tables referenced by FKs  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Responses Re: partitioned tables referenced by FKs  (Michael Paquier <michael@paquier.xyz>)
Re: partitioned tables referenced by FKs  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Delay locking partitions during query execution
Next
From: Isaac Morland
Date:
Subject: Re: Strange query behaviour