Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 1FB9EB5DC09 for ; Thu, 26 May 2011 13:34:47 -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 65954-07 for ; Thu, 26 May 2011 16:34:39 +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 02DC7B5DBF7 for ; Thu, 26 May 2011 13:34:38 -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 p4QGYYp1025333; Thu, 26 May 2011 12:34:34 -0400 (EDT) To: Alvaro Herrera cc: Euler Taveira de Oliveira , Robert Haas , Emanuel , pgsql-bugs Subject: Re: BUG #6041: Unlogged table was created bad in slave node In-reply-to: <1306427067-sup-7622@alvh.no-ip.org> References: <201105261137.p4QBbTlt077425@wwwmaster.postgresql.org> <4DDE7905.6050406@timbira.com> <1306427067-sup-7622@alvh.no-ip.org> Comments: In-reply-to Alvaro Herrera message dated "Thu, 26 May 2011 12:24:57 -0400" Date: Thu, 26 May 2011 12:34:34 -0400 Message-ID: <25332.1306427674@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: 201105/191 X-Sequence-Number: 30330 Alvaro Herrera writes: > Excerpts from Euler Taveira de Oliveira's message of jue may 26 12:00:05 -0400 2011: >> I think we should emit the real cause in those cases, if possible (not too >> much overhead). The message would be "Unlogged table content is not available >> in standby server". > I guess what it should do is create an empty file in the slave. Probably it should, because won't the table malfunction after the slave is promoted to master, if there's no file at all there? Or will the process of coming live create an empty file even if there was none? But Euler is pointing out a different issue, which is usability. If the slave just acts like the table is present but empty, we are likely to get bug reports about that too. An error telling you you aren't allowed to access such a table on slaves would be more user-friendly, if we can do it without too much pain. regards, tom lane