Re: [HACKERS] How to determine that a TransactionId is reallyaborted? - Mailing list pgsql-hackers

From Eric Ridge
Subject Re: [HACKERS] How to determine that a TransactionId is reallyaborted?
Date
Msg-id 5F4E8BE7-4605-4AFF-AD31-8971F9FFAB86@gmail.com
Whole thread Raw
In response to Re: [HACKERS] How to determine that a TransactionId is really aborted?  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: [HACKERS] How to determine that a TransactionId is really aborted?
Re: [HACKERS] How to determine that a TransactionId is reallyaborted?
List pgsql-hackers
> On Oct 22, 2017, at 3:24 PM, Peter Geoghegan <pg@bowt.ie> wrote:
>
> On Sun, Oct 22, 2017 at 2:19 PM, Eric Ridge <eebbrr@gmail.com> wrote:
>> I'm looking for the status as any concurrent open transaction might see it.  For example, if any concurrent
transactionmight see it as "in progress", that's what I'd want returned.  Does that make sense? 
>
> Maybe, but note that that's fundamentally something that can become
> stale immediately. And, just because an MVCC snapshot cannot see a row
> does not mean that it cannot affect its transaction/statement in some
> other way (e.g. unique index enforcement).

Sure, but I don't think I care if it becomes stale immediately.  If I ask "now" and PG says "in progress" but it then
abortsa few cycles later, I'll just ask again sometime in the future.  It's not like a transaction is going to go from
"aborted"back to "in progress" -- geez, at least I hope not! 

I think question I want to answer is "will all active and future transactions see this TransationId as aborted at the
timethey started"? 

> Again, you'll probably need to put this low level requirement into
> context if you want sound advice from this list.

I'm just thinking out lout here, but the context is likely something along the lines of externally storing all
transactionids, and periodically asking Postgres if they're known-to-be-aborted-by-all-transactions -- one at a 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 by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: [HACKERS] How to determine that a TransactionId is really aborted?
Next
From: Michael Paquier
Date:
Subject: [HACKERS] Re: [BUGS] BUG #14849: jsonb_build_object doesn't like VARIADIC callsvery much