Re: Should we add GUCs to allow partition pruning to be disabled? - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Should we add GUCs to allow partition pruning to be disabled?
Date
Msg-id 20180423211024.ydvo6xuce6jfnmhx@alvherre.pgsql
Whole thread Raw
In response to Re: Should we add GUCs to allow partition pruning to be disabled?  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Responses Re: Should we add GUCs to allow partition pruning to be disabled?
Re: Should we add GUCs to allow partition pruning to be disabled?
List pgsql-hackers
Hi,

I just pushed David patch, with some pretty minor changes.  I hope not
to have broken anything.

Amit Langote wrote:

> Your proposed changes to inheritance_planner() look fine to me. In the
> comment added by the patch in relation_excluded_by_constraints():
> 
> + /*
> +  * When constraint_exclusion is set to 'partition' we only handle
> +  * OTHER_MEMBER_RELs, or BASERELs in cases where the result target is an
> +  * inheritance parent or a partitioned table.
> +  */
> 
> Just to clarify this a bit, would it be a good idea to be specific by
> appending " (see inheritance_planner() where this is determined)" or some
> such to this sentence?

I didn't think that was really required.

> BTW, while we're at it, would it also be a good idea to consider the patch
> you had proposed, which I then posted an updated version of, to adjust the
> documentation in ddl.sgml (in the section 5.10. Table Partitioning)
> regarding the relationship between constraint exclusion and declarative
> partitioning?

I looked at this one.  That patch has two hunks.  I applied a change
where the first hunk is, to replace constraint_exclusion with the new
GUC -- seemed easy enough.  However, the second hunk is on "5.10.4.
Partitioning and Constraint Exclusion" which needs major editing.  Not
really sure how best to handle that one.  For starters, I think it need
to stop mentioning the GUC name in the title; maybe rename it to
"Partition Pruning" or some such, and then in the text explain that
sometimes the enable_partition_pruning param is used in one case and
constraint_exclusion in the other, and approximately what effects they
have.  I don't think it's worth going into too much detail on exactly
how they differ, but then I'm not 100% sure of that either.

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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: "could not reattach to shared memory" on buildfarm member dory
Next
From: David Rowley
Date:
Subject: Re: bms_prev_member won't work correctly if bitmapword is 64-bits