Re: PL/Perl backed crashed during spi_exec_query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alexey Klyukin <alexk(at)commandprompt(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PL/Perl backed crashed during spi_exec_query
Date: 2009-10-31 17:30:36
Message-ID: 18352.1257010236@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alexey Klyukin <alexk(at)commandprompt(dot)com> writes:
> One of our customers is running 8.2.14 and use a couple of pl/perl and
> pl/perlu functions written by CMD. Everything worked normally until
> they tried to call one particular pl/perl function from pl/perl via
> spi. It appears that a die call inside the callee just crashes the
> backend.

I think the critical point is actually that you're calling plperl from
plperlu, and we're being careless about restoring the former interpreter
selection on error exit. The attached patch moves the responsibility
for that into plperl_call_handler, which already has a suitable
PG_TRY block.

regards, tom lane

Attachment Content-Type Size
restore-interpreter-safely.patch text/x-patch 2.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2009-10-31 17:35:22 Re: Patch set under development to add usage reporting.
Previous Message Andrew Dunstan 2009-10-31 16:25:22 Re: Unicode UTF-8 table formatting for psql text output