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

Arctic Toucan wrote:

> If I "know" that there are no more inserts going into those
> partitioned tables, can I do a bulk change of their relfrozenxids
> setting them back 500million transactions without causing problems?
> This will mean that the relfrozenxid is not representative of the row
> versions, but does that matter in this case(Essentially static
> stables)?   

The safest most current value you can use is that of the oldest
transaction currently running (also known as RecentXmin in the code).
If you choose anything older than that you're safe too.

I don't think you can obtain RecentXmin in SQL (short of writing a C
function)

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.



view thread (6+ messages)  latest in thread

Message-ID: <20081118214623.GT4141@alvh.no-ip.org>
Permalink:  ../20081118214623.GT4141@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20081118214623.GT4141@alvh.no-ip.org

 · 

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: alvherre@commandprompt.com, arctic_toucan@hotmail.com, tgl@sss.pgh.pa.us
  Subject: Re: Is it safe to reset relfrozenxid without using vacuum?
  In-Reply-To: <20081118214623.GT4141@alvh.no-ip.org>

* 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