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

From Sami Imseih
Subject Re: Let plan_cache_mode to be a little less strict
Date
Msg-id CAA5RZ0vvV5AztkC_yAtjsymUWDmCXPSFpHAdb18KxJMU39N8hA@mail.gmail.com
Whole thread Raw
In response to Re: Let plan_cache_mode to be a little less strict  (Andy Fan <zhihuifan1213@163.com>)
Responses Re: Let plan_cache_mode to be a little less strict
List pgsql-hackers
> 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.

The documentation [0] mentions " If this default behavior is
unsuitable, you can alter it by
passing the CURSOR_OPT_GENERIC_PLAN or CURSOR_OPT_CUSTOM_PLAN flag to
SPI_prepare_cursor". The default behavior here is plan_cache_mode = AUTO.

But the docs leave out the fact that is plan_cache_mode is not AUTO, that the
GUC settings take precedence over the cursor_options. I agree as well that is
wrong. I also agree with your fix.

[0] https://www.postgresql.org/docs/current/spi-spi-prepare.html

--
Sami



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: log_min_messages per backend type
Next
From: Paul A Jungwirth
Date:
Subject: Re: Inval reliability, especially for inplace updates