Re: [HACKERS] 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>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Amit Langote <amitlangote09(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-09 09:27:32
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi David.

On 2018/04/09 12:48, David Rowley wrote:
> While looking at the docs in [1], I saw that we still mention:
> 4. Ensure that the constraint_exclusion configuration parameter is not
> disabled in postgresql.conf. If it is, queries will not be optimized
> as desired.
> This is no longer true. The attached patch removed it.
> [1]
Thanks. I was aware of the changes that would need to be made, but you
beat me to writing the patch itself.

About the patch:

While the users no longer need to enable constraint_exclusion true for
select queries, one would still need it for update/delete queries, because
the new pruning logic only gets invoked for the former. Alas...

Also, further down on that page, there is a 5.10.4 Partitioning and
Constraint Exclusion sub-section. I think it would also need some tweaks
due to new developments.

I updated your patch to fix that. Please take a look.


Attachment Content-Type Size
v2-0001-Remove-mention-of-constraint_exclusion-in-partiti.patch text/plain 2.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2018-04-09 09:28:18 Re: Documentation for bootstrap data conversion
Previous Message Amit Langote 2018-04-09 08:58:51 Re: [sqlsmith] Failed assertion on pfree() via perform_pruning_combine_step