pgsql: Fix portalmem.c to avoid keeping a dangling pointer to a cached

Started by Tom Laneabout 16 years ago3 messageshackers
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

Log Message:
-----------
Fix portalmem.c to avoid keeping a dangling pointer to a cached plan list
after it's released its reference count for the cached plan. There are
code paths that might try to examine the plan list before noticing that
the portal is already in aborted state. Report and diagnosis by Tatsuo
Ishii, though this isn't exactly his proposed patch.

Modified Files:
--------------
pgsql/src/backend/utils/mmgr:
portalmem.c (r1.115 -> r1.116)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mmgr/portalmem.c?r1=1.115&r2=1.116)

#2Tatsuo Ishii
t-ishii@sra.co.jp
In reply to: Tom Lane (#1)
Re: pgsql: Fix portalmem.c to avoid keeping a dangling pointer to a cached

Log Message:
-----------
Fix portalmem.c to avoid keeping a dangling pointer to a cached plan list
after it's released its reference count for the cached plan. There are
code paths that might try to examine the plan list before noticing that
the portal is already in aborted state. Report and diagnosis by Tatsuo
Ishii, though this isn't exactly his proposed patch.

Modified Files:
--------------
pgsql/src/backend/utils/mmgr:
portalmem.c (r1.115 -> r1.116)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mmgr/portalmem.c?r1=1.115&r2=1.116)

Thanks. I confirmed the problem goes away. BTW, are we going to back
patch to 8.2 or before?
--
Tatsuo Ishii
SRA OSS, Inc. Japan

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Tatsuo Ishii (#2)
Re: pgsql: Fix portalmem.c to avoid keeping a dangling pointer to a cached

Tatsuo Ishii <ishii@postgresql.org> writes:

Thanks. I confirmed the problem goes away. BTW, are we going to back
patch to 8.2 or before?

That code isn't there before 8.3.

regards, tom lane