Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 48EC0632CA5 for ; Wed, 1 Sep 2010 18:37:02 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 94414-05 for ; Wed, 1 Sep 2010 21:36:54 +0000 (UTC) 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 E5B41632BC7 for ; Wed, 1 Sep 2010 18:36:54 -0300 (ADT) 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 o81LarBS001689; Wed, 1 Sep 2010 17:36:53 -0400 (EDT) To: Ireneusz Pluta cc: pgsql-admin@postgresql.org Subject: Re: Invalid page header In-reply-to: <4C7EC335.8060607@wp.pl> References: <4C7EC335.8060607@wp.pl> Comments: In-reply-to Ireneusz Pluta message dated "Wed, 01 Sep 2010 23:18:45 +0200" Date: Wed, 01 Sep 2010 17:36:53 -0400 Message-ID: <1688.1283377013@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201009/5 X-Sequence-Number: 35549 Ireneusz Pluta writes: > - when playing with pg_filedump I noticed that last pages of the table > are always initially reported as damaged, as they come, then, as newer > pages get allocated and filled, these initially bad pages "become > valid", as in the following example repeating the same pg_filedump. This doesn't seem terribly surprising. A newly-added page on disk will be initially filled with zeroes, which I think pg_filedump will complain about. It won't get overwritten with "valid" data until the page is next written, either because of a checkpoint or because the buffer space is needed for another page. pg_filedump can't see the state of the page within the server's buffers, which is what counts here. regards, tom lane