Re: path toward faster partition pruning

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: path toward faster partition pruning
Date: 2017-09-27 01:22:40
Message-ID: d4b6818b-e7ad-0559-faf6-6ef052994f88@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi David,

On 2017/09/27 6:04, David Rowley wrote:
> On 25 September 2017 at 23:04, Amit Langote
> <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>> By the way, I'm now rebasing these patches on top of [1] and will try to
>> merge your refactoring patch in some appropriate way. Will post more
>> tomorrow.
>>
>> [1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=9140cf826
>
> Yeah, I see 0001 conflicts with that. I'm going to set this to waiting
> on author while you're busy rebasing this.

Thanks for the reminder. Just thought I'd say that while I'm actually
done rebasing itself (attaching rebased patches to try 'em out), I'm now
considering Robert's comments and will be busy for a bit revising things
based on those comments.

Some notes about the attached patches:

- 0001 includes refactoring that Dilip proposed upthread [1] (added him as
an author). I slightly tweaked his patch -- renamed the function
get_matching_clause to match_clauses_to_partkey, similar to
match_clauses_to_index.

- Code to set AppendPath's partitioned_rels in add_paths_to_append_rel()
revised by 0a480502b09 (was originally introduced in d3cc37f1d80) is
still revised to get partitioned_rels from a source that is not
PlannerInfo.pcinfo_list. With the new code, partitioned_rels won't
contain RT indexes of the partitioned child tables that were pruned.

Thanks,
Amit

[1]
https://www.postgresql.org/message-id/CAFiTN-tGnQzF_4QtbOHT-3hE%3DOvNaMfbbeRxa4UY0CQyF0G8gQ%40mail.gmail.com

Attachment Content-Type Size
0001-WIP-planner-side-changes-for-partition-pruning.patch text/plain 25.7 KB
0002-WIP-Interface-changes-for-partition_bound_-cmp-bsear.patch text/plain 10.1 KB
0003-WIP-Implement-get_partitions_for_keys.patch text/plain 7.5 KB
0004-Add-more-tests-for-the-new-partitioning-related-plan.patch text/plain 21.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-09-27 02:28:31 Use of RangeVar for partitioned tables in autovacuum
Previous Message Abhinav Singh 2017-09-27 00:46:08 Re: Logical Replication - test_decoding - unchanged-toast-datum