Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 0F9FA6501B7 for ; Tue, 18 Nov 2008 17:46:32 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 78614-10 for ; Tue, 18 Nov 2008 17:46:29 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by mail.postgresql.org (Postfix) with ESMTP id 6F2F66501B3 for ; Tue, 18 Nov 2008 17:46:29 -0400 (AST) Received: from perhan.alvh.no-ip.org (200-126-106-210.bk7-dsl.surnet.cl [200.126.106.210]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id mAILp1ST023580 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 18 Nov 2008 13:51:04 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id A32C647CC5; Tue, 18 Nov 2008 18:46:23 -0300 (CLST) Date: Tue, 18 Nov 2008 18:46:23 -0300 From: Alvaro Herrera To: Arctic Toucan Cc: tgl@sss.pgh.pa.us, pgsql-admin@postgresql.org Subject: Re: Is it safe to reset relfrozenxid without using vacuum? Message-ID: <20081118214623.GT4141@alvh.no-ip.org> References: <20081118162406.GD4141@alvh.no-ip.org> <22056.1227031636@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Tue, 18 Nov 2008 13:51:04 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200811/108 X-Sequence-Number: 30762 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.