Skip site navigation (1) Skip section navigation (2)

Re: age(xid) function bug

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: age(xid) function bug
Date: 2008-08-20 04:06:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > However, the function only does a subtraction with no adjustment for
> > overflow, and considering it returns a signed int, it can't even display
> > the full range of valid values:
> Say again?  The possible range of ages is only 2 billion.

If we assume that only xid stored in actual tables are used, yes:

	test=> select txid_current();
	(1 row)
	test=> select age('4294967290'::xid);
	(1 row)

OK, so it does work based on the limitations we place on stored xids.

  Bruce Momjian  <bruce(at)momjian(dot)us>

  + If your life is a hard drive, Christ can be your backup. +

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2008-08-20 04:10:35
Subject: Re: A smaller default postgresql.conf
Previous:From: Tom LaneDate: 2008-08-20 03:58:46
Subject: Re: age(xid) function bug

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group