Re: Faster setup_param_list() in plpgsql - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Faster setup_param_list() in plpgsql
Date
Msg-id CAFj8pRD9ULEfSHBu1UdOrTeupYrRoR1dOS-3MOt2-9BniedKUA@mail.gmail.com
Whole thread Raw
In response to Re: Faster setup_param_list() in plpgsql  (Pavel Stehule <pavel.stehule@gmail.com>)
List 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.stehule@gmail.com>:


2015-04-29 9:26 GMT+02:00 Pavel Stehule <pavel.stehule@gmail.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


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: pg_rewind test race condition..?
Next
From: Michael Paquier
Date:
Subject: Re: feature freeze and beta schedule