From: | Eric Ridge <eebbrr(at)gmail(dot)com> |
---|---|
To: | Peter Geoghegan <pg(at)bowt(dot)ie> |
Cc: | Jaime Casanova <jaime(dot)casanova(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: How to determine that a TransactionId is really aborted? |
Date: | 2017-10-22 21:44:12 |
Message-ID: | 5F4E8BE7-4605-4AFF-AD31-8971F9FFAB86@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On Oct 22, 2017, at 3:24 PM, Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
>
> On Sun, Oct 22, 2017 at 2:19 PM, Eric Ridge <eebbrr(at)gmail(dot)com> wrote:
>> I'm looking for the status as any concurrent open transaction might see it. For example, if any concurrent transaction might 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 aborts a 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 time they 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 transaction ids, and periodically asking Postgres if they're known-to-be-aborted-by-all-transactions -- one at a time.
eric
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2017-10-22 22:03:13 | Re: [BUGS] BUG #14849: jsonb_build_object doesn't like VARIADIC calls very much |
Previous Message | Peter Geoghegan | 2017-10-22 21:24:26 | Re: How to determine that a TransactionId is really aborted? |