Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 4BD72B62101 for ; Fri, 3 Jun 2011 14:01:52 -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 95784-02 for ; Fri, 3 Jun 2011 17:01:44 +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 3B4ACB88EC3 for ; Fri, 3 Jun 2011 14:01:44 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 9FDFF348045; Fri, 3 Jun 2011 10:01:43 -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 WknKhOf95J5G; Fri, 3 Jun 2011 10:01:41 -0700 (PDT) Received: from perhan.alvh.no-ip.org (unknown [190.95.16.242]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id 262DF348044; Fri, 3 Jun 2011 10:01:41 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id BC5156E499; Fri, 3 Jun 2011 13:01:38 -0400 (CLT) Content-Type: text/plain; charset=UTF-8 Cc: Tom Lane , Euler Taveira de Oliveira , Emanuel , pgsql-bugs Subject: Re: BUG #6041: Unlogged table was created bad in slave node From: Alvaro Herrera To: Robert Haas In-reply-to: References: <201105261137.p4QBbTlt077425@wwwmaster.postgresql.org> <4DDE7905.6050406@timbira.com> <1306427067-sup-7622@alvh.no-ip.org> <25332.1306427674@sss.pgh.pa.us> Date: Fri, 03 Jun 2011 13:01:38 -0400 Message-Id: <1307120363-sup-3085@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: 201106/36 X-Sequence-Number: 30415 Excerpts from Robert Haas's message of vie jun 03 12:44:45 -0400 2011: > On Wed, Jun 1, 2011 at 2:28 PM, Robert Haas wrote: > > (4) It strikes me that it might be possible to address this problem a > > bit more cleanly by allowing mdnblocks() and smgrnblocks() and > > RelationGetNumberOfBlocksInFork() to take a boolean argument > > indicating whether or not an error should be thrown if the underlying > > physical file happens not to exist.  When no error is to be signaled, > > we simply return 0 when the main fork doesn't exist, rather than > > throwing an error. > > If we don't want to gum this with the above-mentioned cruft, the other > obvious alternative here is to do nothing, and live with the > non-beauty of the resulting error message. Option 4 seems reasonable to me ... can you get rid of the dupe smgrnblocks call simultaneously? -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support