Re: [HACKERS] How to determine that a TransactionId is reallyaborted?
От | Alvaro Herrera |
---|---|
Тема | Re: [HACKERS] How to determine that a TransactionId is reallyaborted? |
Дата | |
Msg-id | 20171026135058.fov5mrnvvt3peo7v@alvherre.pgsql обсуждение исходный текст |
Ответ на | Re: [HACKERS] How to determine that a TransactionId is reallyaborted? (Eric Ridge <eebbrr@gmail.com>) |
Список | pgsql-hackers |
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 (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
В списке pgsql-hackers по дате отправления: