Re: plperl crash with Debian 6 (64 bit), pl/perlu, libwww and https - Mailing list pgsql-hackers

From Alex Hunsaker
Subject Re: plperl crash with Debian 6 (64 bit), pl/perlu, libwww and https
Date
Msg-id CAFaPBrRUU9MSqwfeseKL5fzQjsT-FPDPc64mJfcCvLMaoBHHMA@mail.gmail.com
Whole thread Raw
In response to Re: plperl crash with Debian 6 (64 bit), pl/perlu, libwww and https  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: plperl crash with Debian 6 (64 bit), pl/perlu, libwww and https
List pgsql-hackers
On Fri, Aug 5, 2011 at 08:53, Andrew Dunstan <andrew@dunslane.net> wrote:
>
>
> On 08/04/2011 11:23 PM, Alex Hunsaker wrote:
>>
>> [ ... don't let people set signal handlers postgres sets ]
>
> This whole thing is a massive over-reaction to a problem we almost certainly
> know how to fix fairly simply and relatively painlessly, and attempts
> (unsuccessfully, at least insofar as comprehensiveness is concerned) to fix
> a problem nobody's actually reported having AFAIK.

*shrug* OK.

Find attached a version that does the equivalent of local %SIG for
each pl/perl(u) call. I was only able to test on 5.14.1, but I looked
at 5.8.9 to make sure it looks like it works.

Its a tad slower (something like 0.00037ms per call), but uhh thats
quite acceptable IMHO (best of 5 runs):

=> create or replace function simple() returns void as $$ $$ language plperl;
CREATE FUNCTION

-- pre patch
=> select count(simple()) from generate_series(1, 10000000);
Time: 10219.149 ms

-- patched
=> select count(simple()) from generate_series(1, 10000000);
Time: 13924.025 ms

Thoughts?

Attachment

pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Transient plans versus the SPI API
Next
From: Tom Lane
Date:
Subject: Re: Further news on Clang - spurious warnings