Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 9F76AB5F686 for ; Tue, 7 Jun 2011 01:31:13 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 54002-02 for ; Tue, 7 Jun 2011 04:31:06 +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 99E36B5F688 for ; Tue, 7 Jun 2011 01:31:06 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id B6470348045; Mon, 6 Jun 2011 21:31:05 -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 rrCtIF0jVFdl; Mon, 6 Jun 2011 21:31:03 -0700 (PDT) Received: from perhan.alvh.no-ip.org (unknown [190.95.16.242]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id 79495348044; Mon, 6 Jun 2011 21:31:03 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 8F7A66E544; Tue, 7 Jun 2011 00:30:57 -0400 (CLT) Content-Type: text/plain; charset=UTF-8 Cc: Pg Hackers Subject: Re: [BUGS] 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> <1307120363-sup-3085@alvh.no-ip.org> <1307419156-sup-5893@alvh.no-ip.org> Date: Tue, 07 Jun 2011 00:30:57 -0400 Message-Id: <1307421013-sup-7855@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/496 X-Sequence-Number: 189209 Excerpts from Robert Haas's message of mar jun 07 00:07:06 -0400 2011: > Did you intentionally fail to copy the list? No, I noticed after I sent it ... > On Tue, Jun 7, 2011 at 12:03 AM, Alvaro Herrera > wrote: > > Excerpts from Robert Haas's message of lun jun 06 22:29:02 -0400 2011: > >> On Fri, Jun 3, 2011 at 1:01 PM, Alvaro Herrera > >> wrote: > >> > 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? > >> > >> What dup smgrnblocks call? > > > > Err, weren't you saying in option (3) that mdnblocks was being called > > twice during query planning?  If I'm talking nonsense feel free to > > ignore me. > > Oh. It is, but there's no way to avoid that... > > >> Patch along these lines attached. > > > > The declaration vs. definition of these functions seem contradictory -- > > is the third arg "missing_ok" or "fail_if_missing"? > > Woops. I started with it as fail_if_missing and then decided it > should be missing_ok. I can fix that... > -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support