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

Re: is cachedFetchXid ever invalidated?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: is cachedFetchXid ever invalidated?
Date: 2010-12-02 04:34:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> I can't see any place that "cachedFetchXid" is ever invalidated.
> Shouldn't it be invalidated before transaction ID wraparound?

The assumption is that the value won't sit there (in a particular
session), without ever being replaced, while more than 2G transactions
elapse.  Actually you'd need a full 4G transactions to elapse, and then
to wake up just in time to probe the doppelganger of the very same
transaction number, in order to have any risk of a failure.

If that makes you uncomfortable, I've got bad news: there are quite a
few other assumptions of the same ilk about the lifespan of a single
session.  One comparable failure case is that starting a transaction
that acquires an XID, and then going to sleep for ~2G transactions,
will cause all kinds of trouble.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Robert HaasDate: 2010-12-02 04:36:42
Subject: Re: crash-safe visibility map, take three
Previous:From: Andy ColsonDate: 2010-12-02 04:27:37
Subject: Re: unlogged tables

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