Re: expanding inheritance in partition bound order

Amit Langote <langote_amit_f8@lab.ntt.co.jp>

From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2017-08-16T05:36:15Z
Lists: pgsql-hackers

Attachments

Thanks for the review.

On 2017/08/16 2:27, Robert Haas wrote:
> On Wed, Aug 9, 2017 at 10:11 PM, Amit Langote
> <Langote_Amit_f8@lab.ntt.co.jp> wrote:
>>> P.S. While I haven't reviewed 0002 in detail, I think the concept of
>>> minimizing what needs to be built in RelationGetPartitionDispatchInfo
>>> is a very good idea.
>>
>> I put this patch ahead in the list and so it's now 0001.
> 
> I think what you've currently got as
> 0003-Relieve-RelationGetPartitionDispatchInfo-of-doing-an.patch is a
> bug fix that probably needs to be back-patched into v10, so it should
> come first.

That makes sense.  That patch is now 0001.  Checked that it can be
back-patched to REL_10_STABLE.

> I think 0002-Teach-pg_inherits.c-a-bit-about-partitioning.patch and
> 0005-Store-in-pg_inherits-if-a-child-is-a-partitioned-tab.patch should
> be merged into one patch and that should come next,

Merged the two into one: attached 0002.

> followed by
> 0004-Teach-expand_inherited_rtentry-to-use-partition-boun.patch and

This one is now 0003.

> finally what you now have as
> 0001-Decouple-RelationGetPartitionDispatchInfo-from-execu.patch.

And 0004.

> This patch series is blocking a bunch of other things, so it would be
> nice if you could press forward with this quickly.

Attached updated patches.

Thanks,
Amit

Commits

  1. Make RelationGetPartitionDispatchInfo expand depth-first.

  2. Expand partitioned tables in PartDesc order.

  3. Don't lock tables in RelationGetPartitionDispatchInfo.

  4. Speed up dropping tables with many partitions.