Re: PL/Perl backed crashed during spi_exec_query
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexey Klyukin <alexk@commandprompt.com>
Cc: pgsql-hackers@postgresql.org
Date: 2009-10-31T17:30:36Z
Lists: pgsql-hackers
Attachments
- restore-interpreter-safely.patch (text/x-patch) patch
Alexey Klyukin <alexk@commandprompt.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