> On Oct 22, 2017, at 2:50 PM, Jaime Casanova <jaime.casan...@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 might see 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 I thought to check 
TransactionIdPrecedes() first.

I am curious about the lock on ClogTruncationLock... could any of the 
TransactionIdDidXXX calls lie without that lock?  I haven'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

Reply via email to