pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Arctic Toucan <arctic_toucan@hotmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Is it safe to reset relfrozenxid without using vacuum?
Date: Tue, 18 Nov 2008 13:07:16 -0500
Message-ID: <22056.1227031636@sss.pgh.pa.us> (raw)
In-Reply-To: <20081118162406.GD4141@alvh.no-ip.org>
References: <BAY126-W258E8EA30779618A479BFE9C120@phx.gbl>
	<20081118162406.GD4141@alvh.no-ip.org>

Alvaro Herrera <alvherre@commandprompt.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



view thread (6+ messages)  latest in thread

Message-ID: <22056.1227031636@sss.pgh.pa.us>
Permalink:  ../22056.1227031636@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22056.1227031636@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@commandprompt.com, arctic_toucan@hotmail.com
  Subject: Re: Is it safe to reset relfrozenxid without using vacuum?
  In-Reply-To: <22056.1227031636@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox