Re: [HACKERS] path toward faster partition pruning

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: jesper(dot)pedersen(at)redhat(dot)com, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Amit Langote <amitlangote09(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Beena Emerson <memissemerson(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] path toward faster partition pruning
Date: 2018-04-05 22:35:12
Message-ID: 20180405223512.euhn52qm7bcqp2hy@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I seems pretty clear that putting get_matching_partitions() in
catalog/partition.c is totally the wrong thing; it belongs wholly in
partprune. I think the reason you put it there is that it requires
access to a lot of internals that are static in partition.c. In the
attached not yet cleaned version of the patch, I have moved a whole lot
of what you added to partition.c to partprune.c; and for the functions
and struct declarations that were required to make it work, I created
catalog/partition_internal.h.

I changed a lot of code also, but cosmetic changes only.

I'll clean this up a bit more now, and try to commit shortly (or early
tomorrow); wanted to share current status now in case I have to rush
out.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
fastprune.patch text/plain 172.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2018-04-05 22:37:30 Re: Removing useless DISTINCT clauses
Previous Message Andrew Gierth 2018-04-05 22:16:20 Checkpoint not retrying failed fsync?