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

Re: Is it safe to reset relfrozenxid without using vacuum?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Arctic Toucan <arctic_toucan(at)hotmail(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Is it safe to reset relfrozenxid without using vacuum?
Date: 2008-11-18 18:07:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> AFAICS this should be safe.  In fact, in 8.3 TRUNCATE advances
> relfrozenxid.  (Perhaps you should consider upgrading if possible.)
> ...
> Tou could just obtain the xid of the transaction that's going to do the
> import (for example by creating a temp table and getting it's xmin from
> pg_class)

That seems a bit risky.  8.3 resets relfrozenxid to RecentXmin, not the
current transaction's XID.  The OP's thought of taking the max existing
relfrozenxid should be safe though.

Or I guess you could make a temp table and take the relfrozenxid, rather
than the xmin, from its pg_class entry.

			regards, tom lane

In response to


pgsql-admin by date

Next:From: Marcelo CostaDate: 2008-11-18 18:19:23
Subject: Re: Changing encoding
Previous:From: Carol WalterDate: 2008-11-18 18:06:32
Subject: Changing encoding

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