Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id D4D90632CD5 for ; Sun, 15 Aug 2010 18:39:16 -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 84611-06 for ; Sun, 15 Aug 2010 21:39:08 +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 DCAF5632371 for ; Sun, 15 Aug 2010 18:39:09 -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 o7FLd8q7005885; Sun, 15 Aug 2010 17:39:08 -0400 (EDT) To: Robert Haas cc: pgsql-hackers@postgresql.org Subject: Re: DropRelFileNodeBuffers API change (was Re: [BUGS] BUG #5599: Vacuum fails due to index corruption issues) In-reply-to: References: <201008042147.o74LlCge057659@wwwmaster.postgresql.org> <1280978913-sup-5475@alvh.no-ip.org> <8B7319E089E48047A0B688CE9CF54FD855C3C916@USRES8MAIL.asg.com> <1880.1281020817@sss.pgh.pa.us> <3092.1281898690@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Sun, 15 Aug 2010 17:17:50 -0400" Date: Sun, 15 Aug 2010 17:39:08 -0400 Message-ID: <5884.1281908348@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/1044 X-Sequence-Number: 167847 Robert Haas writes: > I really hate this solution, because writing out data that we're about > to throw away just in case we can't actually throw it away seems like > a real waste from a performance standpoint. We went around on this already in the pgsql-bugs thread. I don't much like it either, but there isn't any better solution that seems safe enough to back-patch. > Could we avoid this > altogether by allocating a new relfilenode on truncate? Then we'd have to copy all the data we *didn't* truncate, which is hardly likely to be a win. regards, tom lane