Re: Regression tests fail once XID counter exceeds 2 billion - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Regression tests fail once XID counter exceeds 2 billion
Date
Msg-id CA+U5nM+ox6ZAyiHTYwk6-D2__0Zq1CwKRw_q3sWPpD82Kx_oYA@mail.gmail.com
Whole thread Raw
In response to Regression tests fail once XID counter exceeds 2 billion  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Regression tests fail once XID counter exceeds 2 billion
List pgsql-hackers
On Sun, Nov 13, 2011 at 11:16 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> While investigating bug #6291 I was somewhat surprised to discover
> $SUBJECT.  The cause turns out to be this kluge in alter_table.sql:
>
>        select virtualtransaction
>        from pg_locks
>        where transactionid = txid_current()::integer

...

> that plasters on the appropriate epoch value for an
> assumed-to-be-current-or-recent xid, and returns something that squares
> with the txid_snapshot functions.  Then the test could be coded without
> kluges as

That fixes the test, but it doesn't fix the unreasonability of this situation.

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".

We need a function whose behaviour matches xid columns in pg_locks and
elsewhere and that doesn't need to have anything to do with txid
datatype.

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Kohei KaiGai
Date:
Subject: Prep object creation hooks, and related sepgsql updates
Next
From: Simon Riggs
Date:
Subject: Minor optimisation of XLogInsert()