Re: Regression tests fail once XID counter exceeds 2 billion

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Regression tests fail once XID counter exceeds 2 billion
Дата
Msg-id 20120817000900.GF30286@momjian.us
обсуждение исходный текст
Ответ на Re: Regression tests fail once XID counter exceeds 2 billion  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Nov 16, 2011 at 07:08:27PM -0500, Tom Lane wrote:
> I wrote:
> > Simon Riggs <simon@2ndQuadrant.com> writes:
> >> We need a function called transactionid_current() so a normal user can write
> 
> >> select virtualtransaction
> >> from pg_locks
> >> where transactionid = transactionid_current()
> 
> >> and have it "just work".
> 
> > That would solve that one specific use-case.  The reason I suggested
> > txid_from_xid is that it could also be used to compare XIDs seen in
> > tuples to members of a txid_snapshot, which is not possible now.
> 
> BTW, a pgsql-general question just now made me realize that
> txid_from_xid() could have another use-case too.  Right now, there are
> no inequality comparisons on XIDs, which is necessary because XIDs in
> themselves don't have a total order.  However, you could
> 
>     ORDER BY txid_from_xid(xmin)
> 
> and it would work, ie, give you rows in their XID order.  This could be
> useful for finding the latest-modified rows in a table, modulo the fact
> that it would be ordering by transaction start time not commit time.

Added to TODO:
Add function to allow easier transaction id comparisons
http://archives.postgresql.org/pgsql-hackers/2011-11/msg00786.php
 

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Avoiding shutdown checkpoint at failover
Следующее
От: "Dickson S. Guedes"
Дата:
Сообщение: Re: CREATE SCHEMA IF NOT EXISTS