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

Re: age(xid) on hot standby

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: age(xid) on hot standby
Date: 2011-12-28 19:35:34
Message-ID: 4643.1325100934@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Excerpts from Peter Eisentraut's message of mi dic 28 15:04:09 -0300 2011:
>> On a hot standby, this fails with:
>> ERROR:  cannot assign TransactionIds during recovery

> I think we could just have the xid_age call
> GetCurrentTransactionIdIfAny, and if that returns InvalidXid, use
> ReadNewTransactionId instead.  That xid_age assigns a transaction seems
> more of an accident than really intended.

The trouble with using ReadNewTransactionId is that it makes the results
volatile, not stable as the function is declared to be.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2011-12-28 20:18:36
Subject: Re: spinlocks on HP-UX
Previous:From: Alvaro HerreraDate: 2011-12-28 18:24:02
Subject: Re: age(xid) on hot standby

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