Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 178C59FB3E7 for ; Tue, 27 Feb 2007 02:00:29 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 92689-07 for ; Tue, 27 Feb 2007 02:00:24 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 5E35C9FB837 for ; Tue, 27 Feb 2007 01:55:25 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l1R5tLTW012632; Tue, 27 Feb 2007 00:55:21 -0500 (EST) To: "Jim C. Nasby" cc: ITAGAKI Takahiro , pgsql-hackers@postgresql.org Subject: Re: Dead Space Map version 2 In-reply-to: <20070227051144.GK29041@nasby.net> References: <20070227113655.6381.ITAGAKI.TAKAHIRO@oss.ntt.co.jp> <20070227051144.GK29041@nasby.net> Comments: In-reply-to "Jim C. Nasby" message dated "Mon, 26 Feb 2007 23:11:44 -0600" Date: Tue, 27 Feb 2007 00:55:21 -0500 Message-ID: <12631.1172555721@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.053 tagged_above=0 required=5 tests=AWL, BAYES_50, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200702/1665 X-Sequence-Number: 99218 "Jim C. Nasby" writes: > Yes, DSM would make FSM recovery more important, but I thought it was > recoverable now? Or is that only on a clean shutdown? Currently we throw away FSM during any non-clean restart. This is probably overkill but I'm quite unclear what would be a safe alternative. > I suspect we don't need perfect recoverability... The main problem with the levels proposed by Takahiro-san is that any transition from FROZEN to not-FROZEN *must* be exactly recovered, because vacuum will never visit an allegedly frozen page at all. This appears to require WAL-logging DSM state changes, which is a pretty serious performance hit. I'd be happier if the DSM content could be treated as just a hint. I think that means not trusting it for whether a page is frozen to the extent of not needing vacuum even for wraparound. So I'm inclined to propose that there be only two states (hence only one DSM bit per page): page needs vacuum for space recovery, or not. Vacuum for XID wraparound would have to hit every page regardless. regards, tom lane