pgsql: The previous fix in CVS HEAD and 8.4 for handling the case where - Mailing list pgsql-committers

From heikki@postgresql.org (Heikki Linnakangas)
Subject pgsql: The previous fix in CVS HEAD and 8.4 for handling the case where
Date
Msg-id 20100705092749.74E667541D4@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
The previous fix in CVS HEAD and 8.4 for handling the case where a cursor
being used in a PL/pgSQL FOR loop is closed was inadequate, as Tom Lane
pointed out. The bug affects FOR statement variants too, because you can
close an implicitly created cursor too by guessing the "<unnamed portal X>"
name created for it.

To fix that, "pin" the portal to prevent it from being dropped while it's
being used in a PL/pgSQL FOR loop. Backpatch all the way to 7.4 which is
the oldest supported version.

Tags:
----
REL8_0_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/mmgr:
        portalmem.c (r1.76.4.2 -> r1.76.4.3)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mmgr/portalmem.c?r1=1.76.4.2&r2=1.76.4.3)
    pgsql/src/include/utils:
        portal.h (r1.54.4.1 -> r1.54.4.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/portal.h?r1=1.54.4.1&r2=1.54.4.2)
    pgsql/src/pl/plpgsql/src:
        pl_exec.c (r1.127.4.8 -> r1.127.4.9)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_exec.c?r1=1.127.4.8&r2=1.127.4.9)

pgsql-committers by date:

Previous
From: heikki@postgresql.org (Heikki Linnakangas)
Date:
Subject: pgsql: The previous fix in CVS HEAD and 8.4 for handling the case where
Next
From: heikki@postgresql.org (Heikki Linnakangas)
Date:
Subject: pgsql: The previous fix in CVS HEAD and 8.4 for handling the case where