Re: cached plans and enable_partition_pruning

2018-07-23 Thread Andres Freund
On 2018-07-23 12:03:32 -0400, Alvaro Herrera wrote: > On 2018-Jul-24, Amit Langote wrote: > > > On Mon, Jul 23, 2018 at 11:20 PM, Andres Freund wrote: > > > > I think it's correct to check the plan time value, rather than the > > > execution time value. Other enable_* GUCs also take effect

Re: cached plans and enable_partition_pruning

2018-07-23 Thread Amit Langote
On Mon, Jul 23, 2018 at 11:20 PM, Andres Freund wrote: > Hi, > > On 2018-07-23 18:31:43 +0900, Amit Langote wrote: >> It seems that because enable_partition_pruning's value is only checked >> during planning, turning it off *after* a plan is created and cached does >> not work as expected. [ ...

Re: cached plans and enable_partition_pruning

2018-07-23 Thread Andres Freund
Hi, On 2018-07-23 18:31:43 +0900, Amit Langote wrote: > It seems that because enable_partition_pruning's value is only checked > during planning, turning it off *after* a plan is created and cached does > not work as expected. > > create table p (a int) partition by list (a); > create table p1

cached plans and enable_partition_pruning

2018-07-23 Thread Amit Langote
It seems that because enable_partition_pruning's value is only checked during planning, turning it off *after* a plan is created and cached does not work as expected. create table p (a int) partition by list (a); create table p1 partition of p for values in (1); create table p1 partition of p for