pgsql-server: PortalRun must guard against the possibility that the

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql-server: PortalRun must guard against the possibility that the
Date: 2004-10-04 21:52:15
Message-ID: 20041004215215.5EB4132A17A@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
PortalRun must guard against the possibility that the portal it's
running contains VACUUM or a similar command that will internally start
and commit transactions. In such a case, the original caller values of
CurrentMemoryContext and CurrentResourceOwner will point to objects that
will be destroyed by the internal commit. We must restore these pointers
to point to the newly-manufactured transaction context and resource owner,
rather than possibly pointing to deleted memory.
Also tweak xact.c so that AbortTransaction and AbortSubTransaction
forcibly restore a sane value for CurrentResourceOwner, much as they
have always done for CurrentMemoryContext. I'm not certain this is
necessary but I'm feeling paranoid today.
Responds to Sean Chittenden's bug report of 4-Oct.

Modified Files:
--------------
pgsql-server/src/backend/access/transam:
xact.c (r1.190 -> r1.191)
(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/access/transam/xact.c.diff?r1=1.190&r2=1.191)
pgsql-server/src/backend/tcop:
pquery.c (r1.87 -> r1.88)
(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/tcop/pquery.c.diff?r1=1.87&r2=1.88)

Browse pgsql-committers by date

  From Date Subject
Next Message User Andrewd 2004-10-04 22:10:47 pgbuildfarm - client-code: experimental code (turned off by default) to
Previous Message Bruce Momjian 2004-10-04 20:36:13 pgsql-server: Make sure no libs use libpgport by removing it from the