Thread: pgsql: Fix assorted core dumps and Assert failures that could occur
pgsql: Fix assorted core dumps and Assert failures that could occur
From
tgl@postgresql.org (Tom Lane)
Date:
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)