Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 5F227650242 for ; Tue, 18 Nov 2008 14:07:30 -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 30694-01 for ; Tue, 18 Nov 2008 14:07:24 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id C2D2A65028A for ; Tue, 18 Nov 2008 14:07:23 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id mAII7GMY022057; Tue, 18 Nov 2008 13:07:16 -0500 (EST) To: Alvaro Herrera cc: Arctic Toucan , pgsql-admin@postgresql.org Subject: Re: Is it safe to reset relfrozenxid without using vacuum? In-reply-to: <20081118162406.GD4141@alvh.no-ip.org> References: <20081118162406.GD4141@alvh.no-ip.org> Comments: In-reply-to Alvaro Herrera message dated "Tue, 18 Nov 2008 13:24:06 -0300" Date: Tue, 18 Nov 2008 13:07:16 -0500 Message-ID: <22056.1227031636@sss.pgh.pa.us> From: Tom Lane 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/102 X-Sequence-Number: 30756 Alvaro Herrera 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