Re: [HACKERS] PoC plpgsql - possibility to force custom or generic plan - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: [HACKERS] PoC plpgsql - possibility to force custom or generic plan
Date
Msg-id CAFj8pRAtggi_=nFrXrfrr6xutn0QKvqJ88Uu6cFgDK9bDHmE3w@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] PoC plpgsql - possibility to force custom or generic plan  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers


2018-01-23 15:35 GMT+01:00 Robert Haas <robertmhaas@gmail.com>:
On Mon, Jan 22, 2018 at 5:15 PM, Stephen Frost <sfrost@snowman.net> wrote:
> Pavel,
>
> * Pavel Stehule (pavel.stehule@gmail.com) wrote:
>> here is a GUC based patch for plancache controlling. Looks so this code is
>> working.
>
> This really could use a new thread, imv.  This thread is a year old and
> about a completely different feature than what you've implemented here.

+ if (plancache_mode & PLANCACHE_FORCE_GENERIC_PLAN)
+ return false;
+ if (plancache_mode & PLANCACHE_FORCE_CUSTOM_PLAN)
+ return true;

This should be ==, not &.

I could explain why & happens to work, but I won't.

you have true, thank you

Pavel


--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_upgrade tests failing on current master
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] Deadlock in XLogInsert at AIX