Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 73557632400 for ; Thu, 5 Aug 2010 14:19:53 -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 30128-02 for ; Thu, 5 Aug 2010 17:19:45 +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 BFB2F6325B2 for ; Thu, 5 Aug 2010 14:19:45 -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 o75HJfjW023591; Thu, 5 Aug 2010 13:19:41 -0400 (EDT) To: Alvaro Herrera cc: Hitesh Bhambhani , pgsql-bugs Subject: Re: BUG #5599: Vacuum fails due to index corruption issues In-reply-to: <1281027356-sup-6865@alvh.no-ip.org> References: <201008042147.o74LlCge057659@wwwmaster.postgresql.org> <1280978913-sup-5475@alvh.no-ip.org> <8B7319E089E48047A0B688CE9CF54FD855C3C916@USRES8MAIL.asg.com> <1880.1281020817@sss.pgh.pa.us> <1281025234-sup-1704@alvh.no-ip.org> <16374.1281026184@sss.pgh.pa.us> <1281027356-sup-6865@alvh.no-ip.org> Comments: In-reply-to Alvaro Herrera message dated "Thu, 05 Aug 2010 12:57:46 -0400" Date: Thu, 05 Aug 2010 13:19:41 -0400 Message-ID: <23590.1281028781@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201008/121 X-Sequence-Number: 27704 Alvaro Herrera writes: > Excerpts from Tom Lane's message of jue ago 05 12:36:24 -0400 2010: >> Gone? Looks like it's still there to me. > I mean the btree code that does the truncation on vacuum full is > truncated. There are other uses for truncation, but it doesn't look to > that they are as problematic ... or are they? I think what Hitesh reported is a special case of a generic problem. > Hmm, I guess truncation of heap on lazy vacuum is still a problem > precisely because page compaction will be forgotten. Page compaction is the least of it :-( Imagine that we have some rows at the end of a table, we delete them, we vacuum before the next checkpoint. Vacuum decides it can now truncate away the last pages, but fails to do so. The original page state is still on disk, which means we have lost the fact of the deletion --- the rows are now effectively live again, though their index entries are probably gone. In any case, the removal of VACUUM FULL didn't completely disable shrinking of btree indexes did it? I don't recall having removed that. regards, tom lane