Re: Faster setup_param_list() in plpgsql

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Faster setup_param_list() in plpgsql
Date: 2015-05-01 05:48:38
Message-ID: CAFj8pRD9ULEfSHBu1UdOrTeupYrRoR1dOS-3MOt2-9BniedKUA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Review:

What this patch does - it change a mechanism, how a values of variables are
transmitted to SPI. In previous variant values are copied to ParamListInfo
before every evaluation of any expression. New mechanism is smarter. It
refresh only ROW, REC values when are marked as dirty (when these variables
was used). ParamListInfo is dynamically updated when value is assigned to
variable.

This patch can significantly reduce a overhead related to preparing
parameters - more it cleaning code.

1. There are no problem with patching, regress tests
2. The changes are clean and well documented
3. I can confirm 10% of speedup.

This patch is ready for commit.

Regards

Pavel Stehule

2015-04-30 20:50 GMT+02:00 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:

>
>
> 2015-04-29 9:26 GMT+02:00 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
>
>> Hi all
>>
>> I am looking on this patch. I can confirm 10-15% speedup - and the idea
>> behind this patch looks well.
>>
>> This patch
>> http://www.postgresql.org/message-id/4146.1425872254@sss.pgh.pa.us
>> contains two parts
>>
>> a) relative large refactoring
>>
>> b) support for resettable fields in param_list instead total reset
>>
>> I believe it should be in two separate patches. Refactoring is trivial
>> and there is no any possible objection.
>>
>
> I was wrong, there is relative strong dependency between these two parts,
> so it should be commited as one patch
>
> Regards
>
> Pavel
>
>
>>
>> Regards
>>
>> Pavel
>>
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2015-05-01 05:50:50 Re: Failure to coerce unknown type to specific type
Previous Message Heikki Linnakangas 2015-05-01 05:09:41 Re: pg_rewind test race condition..?