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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-admin by date

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