From: Tom Lane Date: Fri, 4 May 2001 18:39:16 +0000 (+0000) Subject: Seems like we should not hold off cancel/die interrupts while we are X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=dd54fdca2aad836ce9a8f6520c2134b79c0da332;p=users%2Fbernd%2Fpostgres.git Seems like we should not hold off cancel/die interrupts while we are running deferred triggers. They are really part of the regular transaction, and they could take awhile. --- diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 92871fa5c3..ae1add8ac0 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -1026,9 +1026,6 @@ CommitTransaction(void) if (s->state != TRANS_INPROGRESS) elog(NOTICE, "CommitTransaction and not in in-progress state "); - /* Prevent cancel/die interrupt while cleaning up */ - HOLD_INTERRUPTS(); - /* * Tell the trigger manager that this transaction is about to be * committed. He'll invoke all trigger deferred until XACT before we @@ -1036,6 +1033,9 @@ CommitTransaction(void) */ DeferredTriggerEndXact(); + /* Prevent cancel/die interrupt while cleaning up */ + HOLD_INTERRUPTS(); + /* * set the current transaction state information appropriately during * the abort processing