Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id B53AAB5DBE0 for ; Fri, 27 May 2011 03:25:53 -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 59504-09 for ; Fri, 27 May 2011 06:25:46 +0000 (UTC) X-Greylist: delayed 00:10:41.057352 by SQLgrey-1.7.6 Received: from mail12.ics.ntts.co.jp (mail12.ics.ntts.co.jp [210.232.35.65]) by mail.postgresql.org (Postfix) with ESMTP id 094A5B5D832 for ; Fri, 27 May 2011 03:25:45 -0300 (ADT) Received: from sadoku33.silk.ntts.co.jp (sadoku33 [10.7.18.33]) by mail12.ics.ntts.co.jp (8.14.4/8.13.4/NTTSOFT) with ESMTP id p4R6F3jk024421 for ; Fri, 27 May 2011 15:15:03 +0900 (JST) Received: (from root@localhost) by sadoku33.silk.ntts.co.jp (8.13.8/NTTSOFT) id p4R6F39R019543 for pgsql-bugs@postgresql.org; Fri, 27 May 2011 15:15:03 +0900 (JST) Received: from ccmds32.silk.ntts.co.jp [10.107.0.32] by sadoku33.silk.ntts.co.jp with SMTP id RAA19540; Fri, 27 May 2011 15:15:03 +0900 Received: from mail137.silk.ntts.co.jp (ccmds32.silk.ntts.co.jp [127.0.0.1]) by ccmds32.silk.ntts.co.jp (8.14.3/8.14.3) with ESMTP id p4R6F2li013771 for ; Fri, 27 May 2011 15:15:02 +0900 Received: from mail137.silk.ntts.co.jp (localhost [127.0.0.1]) by mail137.silk.ntts.co.jp (8.14.4/NTTSOFT) with ESMTP id p4R6F2hu015881 for ; Fri, 27 May 2011 15:15:02 +0900 (JST) Received: from ccmds32 (ccmds32.silk.ntts.co.jp [10.107.0.32]) by mail137.silk.ntts.co.jp (8.14.4/NTTSOFT) with SMTP id p4R6F2YR015874 for ; Fri, 27 May 2011 15:15:02 +0900 (JST) Message-ID: <4DDF4169.9040001@po.ntts.co.jp> Date: Fri, 27 May 2011 15:15:05 +0900 From: Tomonari Katsumata User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Re: BUG #6042: unlogged table with Streaming Replication References: <201105270526.p4R5Qlxs072183@wwwmaster.postgresql.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-CC-Mail-RelayStamp: CC-Mail-V4.3-Client X-CC-Mail-RelayStamp: CC-Mail-V4.3-Server X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.419 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FS_REPLICA=3.599, SARE_SPEC_REPLICA=0.72, T_FRT_BELOW2=0.01, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: ** X-Archive-Number: 201105/197 X-Sequence-Number: 30336 Hi, Jaime thank you for your answer. I understand it. I turned synchronous_commit to "local", I get desirable behavior. I've thought that if there are no standby, the primary would behave like stand-alone... sorry, this is my misunderstanding. regards, (2011/05/27 14:53), Jaime Casanova wrote: > On Fri, May 27, 2011 at 12:26 AM, Tomonari Katsumata > wrote: >> >> I've checked "unlogged table" and "Streaming Replication". >> I'm thinking about using unlogged tables as work-tables on Primary. >> >> 1) construct Streaming Replication Environment. >> Primary and Standby are same server with different database cluster and >> port number. >> >> 2) create unlogged table on Primary. >> =# CREATE UNLOGGED TABLE tbl1(i int); >> This table is available on primary only. >> > because streaming replication works shipping WAL records (the records > of the transactional log) to the standby but because UNLOGGED tables > are not logged to WAL i guess those always will be empty on standby, > but the table should appear on the standby, i guess > > >> 4) create unlogged table on Primary again. >> =# CREATE UNLOGGED TABLE tbl2(i int); >> >> when I executed 4), any response is not back to my psql. and I canceled the >> query, I got messages bellow. >> --- >> Cancel request sent >> WARNING: canceling wait for synchronous replication due to user request >> DETAIL: The transaction has already committed locally, but may not have >> been replicated to the standby. >> CREATE TABLE >> --- >> and the table has been created. >> >> I think It's strange behavior(a canceled table has been created). >> > actually, you're not cancelling the creation... the table has been > created and the wal is being sent to the standby (because the standby > is a synchronous standby, it keeps waiting until the standby aknlowdge > to have received the wal), so what you are cancelling now is the > primary waiting for the standby... > > > btw, i guess we should be defaulting to asynchronous standbys (ie: > synchronous_commit=local) >