pgsql: The previous fix in CVS HEAD and 8.4 for handling the case where

From: heikki(at)postgresql(dot)org (Heikki Linnakangas)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: The previous fix in CVS HEAD and 8.4 for handling the case where
Date: 2010-07-05 09:27:42
Message-ID: 20100705092742.8E5457541D4@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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_1_STABLE

Modified Files:
--------------
pgsql/src/backend/utils/mmgr:
portalmem.c (r1.82.2.2 -> r1.82.2.3)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mmgr/portalmem.c?r1=1.82.2.2&r2=1.82.2.3)
pgsql/src/include/utils:
portal.h (r1.57 -> r1.57.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/portal.h?r1=1.57&r2=1.57.2.1)
pgsql/src/pl/plpgsql/src:
pl_exec.c (r1.154.2.10 -> r1.154.2.11)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_exec.c?r1=1.154.2.10&r2=1.154.2.11)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2010-07-05 09:27:49 pgsql: The previous fix in CVS HEAD and 8.4 for handling the case where
Previous Message Heikki Linnakangas 2010-07-05 09:27:37 pgsql: The previous fix in CVS HEAD and 8.4 for handling the case where