From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Alex Hunsaker <badalex(at)gmail(dot)com> |
Cc: | pgsql-committers(at)postgresql(dot)org, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Fix breakage from earlier plperl fix. |
Date: | 2012-01-05 23:59:53 |
Message-ID: | 4F063979.5090708@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On 01/05/2012 06:31 PM, Alex Hunsaker wrote:
> On Thu, Jan 5, 2012 at 16:02, Andrew Dunstan<andrew(at)dunslane(dot)net> wrote:
>> Fix breakage from earlier plperl fix.
>>
>> Apparently the perl garbage collector was a bit too eager, so here
>> we control when the new SV is garbage collected.
> I know im a little late to the party...
>
> I can't help but think this seems a bit inefficient for the common
> case. Would it be worth only copying the sv when its a glob or
> readonly? Something like the below? I tested a few more svtypes that
> were easy to make (code, regexp) and everything seems peachy.
I'm not so concerned about elog() use, and anyway there the most common
case surely will be passing a readonly string.
I'm more concerned about all the other places we call sv2cstr().
"SvTYPE(sv) == SVt_PVGV" is what I was looking for in vain in the perl docs.
So, yes, we should probably adjust this one more time, but ideally we
need a better test than just SvREADONLY(). If you want to follow up your
investigation of exactly when we need a copied SV and see how much you
can narrow it down that would be great.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Alex Hunsaker | 2012-01-06 03:59:33 | Re: pgsql: Fix breakage from earlier plperl fix. |
Previous Message | Alex Hunsaker | 2012-01-05 23:31:41 | Re: pgsql: Fix breakage from earlier plperl fix. |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2012-01-06 00:01:10 | Re: Progress on fast path sorting, btree index creation time |
Previous Message | Alex Hunsaker | 2012-01-05 23:31:41 | Re: pgsql: Fix breakage from earlier plperl fix. |