Eric Ridge wrote: > > 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.
I think if you just check the global xmin, then you're going to maintain a very long list of transactions "potentially running" whenever there are long-lived transactions (pg_dump, for example). You could try to add a TransactionIdIsInProgress() somewhere and discard the xact downright (by DidCommit and DidAbort) if it returns false. A single long-running transaction can keep the global xmin down by hundreds of millions of Xids. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers