Re: [HACKERS] Cached plans and statement generalization - Mailing list pgsql-hackers

From Konstantin Knizhnik
Subject Re: [HACKERS] Cached plans and statement generalization
Date
Msg-id 283dfb96-48c2-1a87-90ab-97ca87b237fe@postgrespro.ru
Whole thread Raw
In response to Re: [HACKERS] Cached plans and statement generalization  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Responses Re: [HACKERS] Cached plans and statement generalization  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-hackers
On 10.05.2017 19:11, Konstantin Knizhnik wrote:
>
> Based on the Robert's feedback and Tom's proposal I have implemented 
> two new versions of autoprepare patch.
>
> First version is just refactoring of my original implementation: I 
> have extracted common code into prepare_cached_plan and 
> exec_prepared_plan
> function to avoid code duplication. Also I rewrote assignment of 
> values to parameters. Now types of parameters are inferred from types 
> of literals, so there may be several
> prepared plans which are different only by types of parameters. Due to 
> the problem with type coercion for parameters, I have to catch errors 
> in parse_analyze_varparams.
>

Attached please find rebased version of the autoprepare patch based on 
Tom's proposal (perform analyze for tree with constant literals and then 
replace them with parameters).
Also I submitted this patch for the Autum commitfest.

-- 
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: [HACKERS] Walsender timeouts and large transactions
Next
From: Jeff Janes
Date:
Subject: [HACKERS] CREATE STATISTICS statistic_type documentation