[HACKERS] How to determine that a TransactionId is really aborted?
От | Eric Ridge |
---|---|
Тема | [HACKERS] How to determine that a TransactionId is really aborted? |
Дата | |
Msg-id | 75FF3934-2F85-4E19-8F9C-B77B08F7DD11@gmail.com обсуждение исходный текст |
Ответы |
Re: [HACKERS] How to determine that a TransactionId is really aborted?
Re: [HACKERS] How to determine that a TransactionId is really aborted? |
Список | pgsql-hackers |
When sitting inside an extension, and given an arbitrary TransactionId, how can you determine that it aborted/crashed *and*that no other active transaction thinks it is still running? I've tried to answer this question myself (against the 9.3 sources), and it seems like it's just: { TransactionId oldestXmin = GetOldestXmin (false, false); TransactionId xid = 42; if (TransactionIdPrecedes(xid, oldestXmin)&& !TransactionIdDidCommit(xid) && !TransactionIdIsInProgress(xid)) /* not even sure this is necessary?*/ { /* xid is aborted/crashed and no active transaction cares */ } } Can anyone confirm or deny that this is correct? I feel like it is correct, but I'm no expert. Thanks so much for your time! eric -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
В списке pgsql-hackers по дате отправления: