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

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

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Arctic Toucan <arctic_toucan(at)hotmail(dot)com>
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-admin(at)postgresql(dot)org
Subject: Re: Is it safe to reset relfrozenxid without using vacuum?
Date: 2008-11-18 21:46:23
Message-ID: 20081118214623.GT4141@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-admin
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.

In response to

Responses

pgsql-admin by date

Next:From: Abdul RahmanDate: 2008-11-19 12:14:00
Subject: Scheduling backup via PgAgent
Previous:From: Arctic ToucanDate: 2008-11-18 21:33:52
Subject: Re: Is it safe to reset relfrozenxid without using vacuum?

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