Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id D9CADB5F472 for ; Tue, 7 Jun 2011 11:24:27 -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 48102-03 for ; Tue, 7 Jun 2011 14:24:20 +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 B9E9AB5F3E2 for ; Tue, 7 Jun 2011 11:24:20 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 7802C348045; Tue, 7 Jun 2011 07:24:20 -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 AAsZ35OWqH0V; Tue, 7 Jun 2011 07:24:15 -0700 (PDT) Received: from perhan.alvh.no-ip.org (unknown [190.95.30.33]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id D67F4348044; Tue, 7 Jun 2011 07:24:14 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 9FA7B6E544; Tue, 7 Jun 2011 10:24:12 -0400 (CLT) Content-Type: text/plain; charset=UTF-8 Cc: Simon Riggs , 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: Tue, 07 Jun 2011 10:24:12 -0400 Message-Id: <1307456529-sup-7240@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/62 X-Sequence-Number: 30441 Excerpts from Robert Haas's message of mar jun 07 08:16:01 -0400 2011: > On Tue, Jun 7, 2011 at 2:57 AM, Simon Riggs wrote: > > Seems like you're trying to fix the problem directly, which as you > > say, has problems. > > > > At some point we resolve from a word mentioned in the FROM clause to a > > relfilenode. > > > > Surely somewhere there we can notice its unlogged before we end up > > down in the guts of smgr? > > Probably. I guess the question is whether we want this to fail in (a) > the parser, (b) the planner, or (c) the executor. I'm not quite sure > what is best, but if I had to guess I would have picked (c) in > preference to (b) in preference to (a), and you seem to be proposing > (a). Having parserOpenTable() or transformSelectStmt() or some such > place barf doesn't feel right - it's not the job of those functions to > decide whether the query can actually be executed at the moment, just > whether it's well-formed. Really? I thought it was the job of the parse analysis phase to figure out if table and column names are valid or not, and such. If that's the case, wouldn't it make sense to disallow usage of a table that doesn't "exist" in a certain sense? -- Álvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support