Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 56327632AA4 for ; Thu, 5 Aug 2010 17:09:03 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 68168-09 for ; Thu, 5 Aug 2010 20:08:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og108.obsmtp.com (exprod7og108.obsmtp.com [64.18.2.169]) by mail.postgresql.org (Postfix) with SMTP id 3149B632749 for ; Thu, 5 Aug 2010 17:08:54 -0300 (ADT) Received: from source ([209.85.215.175]) by exprod7ob108.postini.com ([64.18.6.12]) with SMTP ID DSNKTFsaVVczt99iWMWXnllquCb6EPLN3FOY@postini.com; Thu, 05 Aug 2010 13:08:54 PDT Received: by mail-ey0-f175.google.com with SMTP id 5so3349419eyf.34 for ; Thu, 05 Aug 2010 13:08:52 -0700 (PDT) Received: by 10.213.19.6 with SMTP id y6mr3495837eba.96.1281038932729; Thu, 05 Aug 2010 13:08:52 -0700 (PDT) Received: from [192.168.1.117] (dsl-hkibrasgw2-ff7ac300-240.dhcp.inet.fi [88.195.122.240]) by mx.google.com with ESMTPS id v8sm876363eeh.20.2010.08.05.13.08.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 05 Aug 2010 13:08:44 -0700 (PDT) Message-ID: <4C5B1A44.1080504@enterprisedb.com> Date: Thu, 05 Aug 2010 23:08:36 +0300 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux i686; fi-FI; rv:1.9.1.10) Gecko/20100619 Iceowl/1.0b1 Icedove/3.0.5 MIME-Version: 1.0 To: Alvaro Herrera CC: Tom Lane , Hitesh Bhambhani , pgsql-bugs Subject: Re: BUG #5599: Vacuum fails due to index corruption issues 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> <23590.1281028781@sss.pgh.pa.us> <1281029938-sup-3072@alvh.no-ip.org> <25994.1281031275@sss.pgh.pa.us> <1281032780-sup-1394@alvh.no-ip.org> In-Reply-To: <1281032780-sup-1394@alvh.no-ip.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.2 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3 X-Spam-Level: X-Archive-Number: 201008/143 X-Sequence-Number: 27726 On 05/08/10 21:28, Alvaro Herrera wrote: > Excerpts from Tom Lane's message of jue ago 05 14:01:15 -0400 2010: >> Maybe write-the-buffers-first is a sufficient longterm solution. > > Yeah, perhaps it is, though it's a pity that a single platform problem > is going to slow down everyone else. How about performing the truncate as usual, but if it fails, fill the truncated portion with zeros instead? Zeroed pages should be handled gracefully, and this would be a very non-invasive fix. Now if the write() to zero the pages fails too, I guess we'll have to panic, but that's not much different from flushing the dirty pages first. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com