Re: BUG #5556: "cannot drop active portal" and "ERRORDATA_STACK_SIZE exceeded" lead to server crash

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: BUG #5556: "cannot drop active portal" and "ERRORDATA_STACK_SIZE exceeded" lead to server crash
Date: 2010-07-13 08:25:56
Message-ID: 4C3C2314.10701@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 13/07/10 02:22, Tom Lane wrote:
> "Robert Walker"<robwalker01(at)speedymail(dot)org> writes:
>> Description: "cannot drop active portal" and "ERRORDATA_STACK_SIZE
>> exceeded" lead to server crash
>
> We're really going to need to see a self-contained example to do much
> with this.

I see what's going on, I neglected to change subtransaction abort
cleanup the same way I did main transaction cleanup. This is
reproducible with:

CREATE OR REPLACE FUNCTION func() RETURNS VOID AS '
declare
erec record;
--cur CURSOR IS SELECT generate_series(1,10) AS a;
BEGIN
FOR erec IN EXECUTE ''SELECT generate_series(1,10) AS a'' LOOP
raise notice ''row %'', erec.a ;
IF (erec.a = 5) THEN PERFORM closefunc(); END IF;
END LOOP;
RETURN;
END;
' LANGUAGE plpgsql;

CREATE OR REPLACE FUNCTION closefunc() RETURNS void AS ' CLOSE "<unnamed
portal 1>"; ' LANGUAGE sql;

begin;
savepoint sp1;
select func();
rollback to savepoint sp1;

Thanks for the report! I'll fix that.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2010-07-13 09:59:45 Re: BUG #5558: Problema com Bytea (BRASIL)
Previous Message Christopher Head 2010-07-13 08:25:40 BUG #5559: Full SSL verification fails when hostaddr provided