Re: PANIC :Call AbortTransaction when transaction id is no normal
От | Kuntal Ghosh |
---|---|
Тема | Re: PANIC :Call AbortTransaction when transaction id is no normal |
Дата | |
Msg-id | CAGz5QCJKDptF4R0xHzM9YLxbLwZHA9enW9zjOi+vF93HVycVgw@mail.gmail.com обсуждение исходный текст |
Ответ на | PANIC :Call AbortTransaction when transaction id is no normal (Thunder <thunder1@126.com>) |
Ответы |
Re: PANIC :Call AbortTransaction when transaction id is no normal
|
Список | pgsql-hackers |
I try to fix this issue and check whether it's normal transaction id before we do abort.
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 20feeec327..dbf2bf567a 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -4504,8 +4504,13 @@ RollbackAndReleaseCurrentSubTransaction(void)
void
AbortOutOfAnyTransaction(void)
{
+ TransactionId xid = GetCurrentTransactionIdIfAny();
TransactionState s = CurrentTransactionState;
+ /* 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?
В списке pgsql-hackers по дате отправления: