On 13/07/10 02:22, Tom Lane wrote:
"Robert Walker"<robwalke...@speedymail.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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs