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.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company