Let plan_cache_mode to be a little less strict - Mailing list pgsql-hackers

From Andrei Lepikhov
Subject Let plan_cache_mode to be a little less strict
Date
Msg-id 458ace73-4827-43e1-8a30-734a93d4720f@gmail.com
Whole thread Raw
List pgsql-hackers
Hi,

I believe the behaviour of the choose_custom_plan function should be 
adjusted slightly.

The CachedPlanSource can operate in either auto mode or force a specific 
plan type. Currently, the force_generic_plan option declares all plans 
as generic, except one-shot plans, of course. However, the 
CachedPlanSource entry also has a cursor_options field that indicates 
the caller's anticipation of a specific plan type for the statement.
This means that the configuration parameter (GUC) currently overrides 
any explicit request for a plan type. The documentation does not clearly 
explain the rationale behind this, at least to me.
I propose that the declaration of cursor_options should take precedence 
over the GUC. This change would alter the interpretation of the GUC from 
a 'forced' plan type to a 'default' plan type. By making this 
adjustment, users and extensions can be more assured that they will 
receive the requested plan type.

If there are no objections, I will add this patch to the next commitfest.

-- 
regards, Andrei Lepikhov

Attachment

pgsql-hackers by date:

Previous
From: "cca5507"
Date:
Subject: Re: Logical replication launcher did not automatically restart when got SIGKILL
Next
From: Rustam Khamidullin
Date:
Subject: [PATCH] Speed up of vac_update_datfrozenxid.