pgsql: Fix an oversight in my patch of a couple weeks ago that ensured a

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix an oversight in my patch of a couple weeks ago that ensured a
Date: 2009-01-01 17:12:16
Message-ID: 20090101171216.C6A29754A03@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Fix an oversight in my patch of a couple weeks ago that ensured a snapshot
is available during datatype input in Bind message processing. I put the
PopActiveSnapshot() or equivalent just before PortalDefineQuery, which is
an unsafe spot for it (in 8.3 and later) because we are carrying a plancache
refcount that hasn't yet been assigned to the portal. Any error thrown there
would result in leaking the refcount. It's not exactly likely that
PopActiveSnapshot would throw an elog, perhaps, but it could happen.
Reorder the code and add another comment warning not to do that.

Modified Files:
--------------
pgsql/src/backend/tcop:
postgres.c (r1.562 -> r1.563)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/postgres.c?r1=1.562&r2=1.563)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2009-01-01 17:12:24 pgsql: Fix an oversight in my patch of a couple weeks ago that ensured a
Previous Message Tom Lane 2008-12-31 23:42:56 pgsql: Throw error if a <window definition> references a window that