Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 2186A63348C for ; Thu, 5 Aug 2010 13:58:03 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 66439-04 for ; Thu, 5 Aug 2010 16:57:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id ECAAE6333F0 for ; Thu, 5 Aug 2010 13:57:55 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 64A06348057; Thu, 5 Aug 2010 09:57:54 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at commandprompt.com Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6puNWNlUWK7L; Thu, 5 Aug 2010 09:57:49 -0700 (PDT) Received: from perhan.alvh.no-ip.org (190-95-29-207.bk17-dsl.surnet.cl [190.95.29.207]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id E9CA6348046; Thu, 5 Aug 2010 09:57:48 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id D88A76E5F1; Thu, 5 Aug 2010 12:57:46 -0400 (CLT) Content-Type: text/plain; charset=UTF-8 Cc: Hitesh Bhambhani , pgsql-bugs Subject: Re: BUG #5599: Vacuum fails due to index corruption issues From: Alvaro Herrera To: Tom Lane In-reply-to: <16374.1281026184@sss.pgh.pa.us> 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> Date: Thu, 05 Aug 2010 12:57:46 -0400 Message-Id: <1281027356-sup-6865@alvh.no-ip.org> User-Agent: Sup/git Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201008/120 X-Sequence-Number: 27703 Excerpts from Tom Lane's message of jue ago 05 12:36:24 -0400 2010: > Alvaro Herrera writes: > > Excerpts from Tom Lane's message of jue ago 05 11:06:57 -0400 2010: > >> 1. Write the dirty buffers before dropping them. Kind of ugly from a > >> performance viewpoint, but simple and safe. > > > I think "simple" is good, considering that this code is gone in 9.0 and > > HEAD. IMHO investing too much effort on this problem is not worth it. > > 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? Hmm, I guess truncation of heap on lazy vacuum is still a problem precisely because page compaction will be forgotten. > > Perhaps it'd be good to come up with a better solution for HEAD: > > Yeah, the panic-on-replay aspect is troublesome. I feel like we need a > rethink here. But I agree that solution #1 is the only one that feels > safe enough for backpatching. -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support