pgsql: Fix assorted core dumps and Assert failures that could occur

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix assorted core dumps and Assert failures that could occur
Date: 2010-01-24 21:49:50
Message-ID: 20100124214950.A38C67541B9@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Fix assorted core dumps and Assert failures that could occur during
AbortTransaction or AbortSubTransaction, when trying to clean up after an
error that prevented (sub)transaction start from completing:
* access to TopTransactionResourceOwner that might not exist
* assert failure in AtEOXact_GUC, if AtStart_GUC not called yet
* assert failure or core dump in AfterTriggerEndSubXact, if
AfterTriggerBeginSubXact not called yet

Per testing by injecting elog(ERROR) at successive steps in StartTransaction
and StartSubTransaction. It's not clear whether all of these cases could
really occur in the field, but at least one of them is easily exposed by
simple stress testing, as per my accidental discovery yesterday.

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
pgsql/src/backend/access/transam:
xact.c (r1.229.2.6 -> r1.229.2.7)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xact.c?r1=1.229.2.6&r2=1.229.2.7)
pgsql/src/backend/commands:
trigger.c (r1.210.2.8 -> r1.210.2.9)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/trigger.c?r1=1.210.2.8&r2=1.210.2.9)
pgsql/src/backend/utils/misc:
guc.c (r1.360.2.5 -> r1.360.2.6)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/guc.c?r1=1.360.2.5&r2=1.360.2.6)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2010-01-24 21:49:58 pgsql: Fix assorted core dumps and Assert failures that could occur
Previous Message Tom Lane 2010-01-24 21:49:39 pgsql: Fix assorted core dumps and Assert failures that could occur