+ /* Check to see if the transaction ID is a permanent one because we cannot abort it */ + if (!TransactionIdIsNormal(xid)) + return; + /* Ensure we're not running in a doomed memory context */ AtAbort_Memory();
Can we fix in this way?
If we fix the issue in this way, we're certainly not going to do all those portal,locks,memory,resource owner cleanups that are done inside AbortTransaction() for a normal transaction ID. But, I'm not sure how relevant those steps are since the database is anyway shutting down.