Re: Usage of epoch in txid_current
От
Andres Freund
Тема
Re: Usage of epoch in txid_current
Дата
Msg-id
20180710024014.jietykoykf5ygr7m@alap3.anarazel.de
Ответ на
Re: Usage of epoch in txid_current (Craig Ringer)
Список
Дерево обсуждения
Usage of epoch in txid_current Amit Kapila <amit.kapila16@gmail.com>
Re: Usage of epoch in txid_current Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: Usage of epoch in txid_current Amit Kapila <amit.kapila16@gmail.com>
Re: Usage of epoch in txid_current Andres Freund <andres@anarazel.de>
Re: Usage of epoch in txid_current Stephen Frost <sfrost@snowman.net>
Re: Usage of epoch in txid_current Tom Lane <tgl@sss.pgh.pa.us>
Re: Usage of epoch in txid_current Andres Freund <andres@anarazel.de>
Re: Usage of epoch in txid_current Amit Kapila <amit.kapila16@gmail.com>
Re: Usage of epoch in txid_current Andres Freund <andres@anarazel.de>
Re: Usage of epoch in txid_current Amit Kapila <amit.kapila16@gmail.com>
Re: Usage of epoch in txid_current Thomas Munro <thomas.munro@enterprisedb.com>
Re: Usage of epoch in txid_current Andres Freund <andres@anarazel.de>
Re: Usage of epoch in txid_current Tom Lane <tgl@sss.pgh.pa.us>
Re: Usage of epoch in txid_current Andres Freund <andres@anarazel.de>
Re: Usage of epoch in txid_current Andres Freund <andres@anarazel.de>
Re: Usage of epoch in txid_current Tom Lane <tgl@sss.pgh.pa.us>
Re: Usage of epoch in txid_current Andres Freund <andres@anarazel.de>
Re: Usage of epoch in txid_current Tom Lane <tgl@sss.pgh.pa.us>
Re: Usage of epoch in txid_current Thomas Munro <thomas.munro@enterprisedb.com>
Re: Usage of epoch in txid_current Thomas Munro <thomas.munro@enterprisedb.com>
Re: Usage of epoch in txid_current Andres Freund <andres@anarazel.de>
Re: Usage of epoch in txid_current Thomas Munro <thomas.munro@gmail.com>
Re: Usage of epoch in txid_current Thomas Munro <thomas.munro@gmail.com>
Re: Usage of epoch in txid_current Heikki Linnakangas <hlinnaka@iki.fi>
Re: Usage of epoch in txid_current Thomas Munro <thomas.munro@gmail.com>
Re: Usage of epoch in txid_current Thomas Munro <thomas.munro@gmail.com>
Re: Usage of epoch in txid_current Heikki Linnakangas <hlinnaka@iki.fi>
Re: Usage of epoch in txid_current Thomas Munro <thomas.munro@gmail.com>
Re: Usage of epoch in txid_current Jeff Janes <jeff.janes@gmail.com>
Re: Usage of epoch in txid_current Jeff Janes <jeff.janes@gmail.com>
Re: Usage of epoch in txid_current Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: Usage of epoch in txid_current Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Usage of epoch in txid_current Robert Haas <robertmhaas@gmail.com>
Re: Usage of epoch in txid_current Thomas Munro <thomas.munro@gmail.com>
Re: Usage of epoch in txid_current Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: Usage of epoch in txid_current Thomas Munro <thomas.munro@gmail.com>
Re: Usage of epoch in txid_current Robert Haas <robertmhaas@gmail.com>
Re: Usage of epoch in txid_current Andres Freund <andres@anarazel.de>
Re: Usage of epoch in txid_current Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: Usage of epoch in txid_current EMMA Jade ANDERSON <emmjadea@gmail.com>
Re: Usage of epoch in txid_current Dmitry Dolgov <9erthalion6@gmail.com>
Re: Usage of epoch in txid_current Thomas Munro <thomas.munro@enterprisedb.com>
Re: Usage of epoch in txid_current Michael Paquier <michael@paquier.xyz>
Re: Usage of epoch in txid_current Tom Lane <tgl@sss.pgh.pa.us>
Re: Usage of epoch in txid_current Andres Freund <andres@anarazel.de>
Re: Usage of epoch in txid_current Thomas Munro <thomas.munro@enterprisedb.com>
Re: Usage of epoch in txid_current Andres Freund <andres@anarazel.de>
Re: Usage of epoch in txid_current Thomas Munro <thomas.munro@enterprisedb.com>
Re: Usage of epoch in txid_current Thomas Munro <thomas.munro@enterprisedb.com>
Re: Usage of epoch in txid_current Craig Ringer <craig@2ndquadrant.com>
Re: Usage of epoch in txid_current Andres Freund <andres@anarazel.de>
Re: Usage of epoch in txid_current Craig Ringer <craig@2ndquadrant.com>
Re: Usage of epoch in txid_current Craig Ringer <craig@2ndquadrant.com>
On 2018-07-10 10:32:44 +0800, Craig Ringer wrote: > On 10 July 2018 at 07:35, Thomas Munro > wrote: > > > > > I played around with this idea yesterday. Experiment-grade patch > > attached. Approach: > > > > 1. Introduce a new type BigTransactionId (better names welcome). > > > > txid_current() should be changed to BigTransactionId too. It's currently > bigint. That's quite a bit more work though, no? We'd have to introduce a new SQL level type (including operators). As I said nearby, I think that's a good idea, but I don't see any sort of benefit of forcing those patches to be done at once. > Users are currently left in a real mess when it comes to pg_stat_activity > xids, etc, which are epoch-unqualified. txid_current() reports an > epoch-qualified xid, but there's no sensible and safe conversion from > txid_current()'s bigint to an epoch-qualified ID. I am confused what you mean by "to an epoch-qualified ID". You want to split txid_current()'s return value into epoch and xid? Isn't that fairly trivial? SELECT bigxid & x'ffffff'::int8 AS xid, bigxid >> 32 epoch FROM txid_current() bigxid; Now I'm not saying that's pretty and couldn't be made easier. Greetings, Andres Freund
В списке pgsql-hackers по дате отправления
От: Masahiko Sawada
Дата: