Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 8EFA01337B4E for ; Fri, 31 Dec 2010 06:42:39 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 15638-01 for ; Fri, 31 Dec 2010 10:42:33 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail148113.authsmtp.com (outmail148113.authsmtp.com [62.13.148.113]) by mail.postgresql.org (Postfix) with ESMTP id EAA2F1337999 for ; Fri, 31 Dec 2010 06:42:31 -0400 (AST) Received: from mail-c194.authsmtp.com (mail-c194.authsmtp.com [62.13.128.121]) by punt10.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id oBVAgItG051564; Fri, 31 Dec 2010 10:42:18 GMT Received: from [192.168.0.2] ([81.5.146.37]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2) with ESMTP id oBVAgGO2034835; Fri, 31 Dec 2010 10:42:16 GMT Subject: Re: Sync Rep Design From: Simon Riggs To: Heikki Linnakangas Cc: Hannu Krosing , Robert Haas , Stefan Kaltenbrunner , pgsql-hackers@postgresql.org In-Reply-To: <4D1DAB14.5000800@enterprisedb.com> References: <1293729972.1892.23804.camel@ebony> <4D1CC47E.7050207@kaltenbrunner.cc> <1293735853.1892.24886.camel@ebony> <4D1D8B2F.5070001@2ndquadrant.com> <4D1DAB14.5000800@enterprisedb.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 31 Dec 2010 10:42:15 +0000 Message-ID: <1293792135.1892.36442.camel@ebony> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Server-Quench: a2c60b3c-14ca-11e0-80b9-0022640b883e X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdxZQATClZOTQEd DAteCiN5VAwpPBRK HVkIKg5MJUcNSQVJ NksacxtFawRbaVxS HGQLWlREUV17XWF/ agwfZQRDZ1RPWwN0 U09WR1pVCwUmXm5n d0lpLRtydAFOe3s+ ZERqV3AVDUYpc0Yv QR1JFGlVNHphaTUf TUhYJQpJcANIfBlB agJ3XHBYLwdSbGoL PyYYHB0LBgAXEzVT SUk3IEpabUsQHzE6 L0N8 X-Authentic-SMTP: 61633235383639.1015:706 X-AuthFastPath: 0 (Was 255) X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. 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, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201012/2542 X-Sequence-Number: 177804 On Fri, 2010-12-31 at 12:06 +0200, Heikki Linnakangas wrote: > On 31.12.2010 09:50, Hannu Krosing wrote: > > On 30.12.2010 22:27, Robert Haas wrote: > >> On Thu, Dec 30, 2010 at 2:04 PM, Simon Riggs > >> wrote: > >>> synchronous_replication (boolean) > >>> Specifies whether transaction commit will wait for WAL records > >>> to be replicated before the command returns a "success" > >>> indication to the client. > >> The word "replicated" here could be taken to mean different things, > >> most obviously: > >> > >> - slave has received the WAL > >> - slave has fsync'd the WAL > >> - slave has applied the WAL > > Perhaps the level of "replication guarantee" should be decided on the > > slave side, by > > having a configuration parameter there > > > > report_as_replicated = received|written_to_disk|fsynced|applied > > > > for different types of hosts may have wildly different guarantees and > > performance > > parameters for these. One could envision a WAL-archive type "standby" > > which is > > there for data persistence only will and never "apply" WAL. > > Agreed, it feels natural to specify when a piece of WAL is acknowledged > in the standby. That can also be done, its not a problem. Many people asked for just "on" or "off". Currently "on" <--> "slave has fsynced" WAL. > Also, I dislike the idea of having the standby > specify that it's a synchronous standby that the master has to wait for. > Behavior on the master should be configured on the master. The parameter on the standby affects the behaviour of the standby. The standby is saying "don't pick me, I'm not a good target". -- Simon Riggs http://www.2ndQuadrant.com/books/ PostgreSQL Development, 24x7 Support, Training and Services