Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 27415B604D7 for ; Mon, 30 May 2011 18:18:43 -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 72788-01-4 for ; Mon, 30 May 2011 21:18:36 +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 3752FB5FEE3 for ; Mon, 30 May 2011 18:18:26 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id A06D6348045; Mon, 30 May 2011 14:18:25 -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 RsbL6EQAyw4I; Mon, 30 May 2011 14:18:23 -0700 (PDT) Received: from perhan.alvh.no-ip.org (unknown [190.95.16.242]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id 9ABAE348044; Mon, 30 May 2011 14:18:23 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 5C8F06E394; Mon, 30 May 2011 17:18:20 -0400 (CLT) Content-Type: text/plain; charset=UTF-8 Cc: pgsql-bugs Subject: Re: Unlogged tables cannot be truncated twice From: Alvaro Herrera To: Greg Sabino Mullane In-reply-to: <20110530160043.GC3012@core.home> References: <20110530160043.GC3012@core.home> Date: Mon, 30 May 2011 17:18:20 -0400 Message-Id: <1306790274-sup-6596@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: 201105/225 X-Sequence-Number: 30364 Excerpts from Greg Sabino Mullane's message of lun may 30 12:00:43 -0400 2011: > Wow, this one took a bit to narrow down. Here's the failing case: > > # create unlogged table foo (a text); > CREATE TABLE > # begin; > BEGIN > #* truncate table foo; > TRUNCATE TABLE > #* truncate table foo; > ERROR: could not create file "base/19131/19183_init": File exists > > Very reproducible. The column types matter: if the only column > is an INT, for example, the problem does not occur. So 19183 is the toast table OID? -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support