Re: [HACKERS] How to determine that a TransactionId is reallyaborted?

Поиск
Список
Период
Сортировка
От Eric Ridge
Тема Re: [HACKERS] How to determine that a TransactionId is reallyaborted?
Дата
Msg-id CAB35990-C3B2-4EBD-8B7B-6DF58595D576@gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] How to determine that a TransactionId is really aborted?  (Jaime Casanova <jaime.casanova@2ndquadrant.com>)
Ответы Re: [HACKERS] How to determine that a TransactionId is really aborted?  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
> On Oct 22, 2017, at 2:50 PM, Jaime Casanova <jaime.casanova@2ndquadrant.com> wrote:
>
> so, what you want is txid_status() [1]... while this is new in v10 you
> can use the code as guide or just migrate to v10 ;)

Oh neat, thanks.

<long pause reading the code>

Doesn't that tell you the status relative to the transaction calling txid_status()?

I'm looking for the status as any concurrent open transaction might see it.  For example, if any concurrent transaction
mightsee it as "in progress", that's what I'd want returned.  Does that make sense?   

That's why I was thinking GetOldestXmin() was the right thing to use rather than GetActiveSnapshot()->xmin and also why
Ithought to check TransactionIdPrecedes() first. 

I am curious about the lock on ClogTruncationLock... could any of the TransactionIdDidXXX calls lie without that lock?
Ihaven't seen such a thing used in the 9.3 sources.  Maybe it's necessary for 10 or maybe I just missed it in 9.3? 

Thanks 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] [BUGS] BUG #14849: jsonb_build_object doesn't like VARIADIC calls very much
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] How to determine that a TransactionId is really aborted?