Thread

  1. Re: plperl crash with Debian 6 (64 bit), pl/perlu, libwww and https

    Alex Hunsaker <badalex@gmail.com> — 2011-08-06T18:37:28Z

    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?