Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 03D401337B84 for ; Thu, 30 Dec 2010 21:38:51 -0400 (AST) 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 29532-08 for ; Fri, 31 Dec 2010 01:38:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail148115.authsmtp.co.uk (outmail148115.authsmtp.co.uk [62.13.148.115]) by mail.postgresql.org (Postfix) with ESMTP id D36011337B5B for ; Thu, 30 Dec 2010 21:38:42 -0400 (AST) Received: from mail-c194.authsmtp.com (mail-c194.authsmtp.com [62.13.128.121]) by punt2.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id oBV1caXp049060; Fri, 31 Dec 2010 01:38:36 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 oBV1cX9b087719; Fri, 31 Dec 2010 01:38:34 GMT Subject: Re: Sync Rep Design From: Simon Riggs To: Jim Nasby Cc: Robert Haas , Stefan Kaltenbrunner , pgsql-hackers@postgresql.org In-Reply-To: <795581D6-9C8B-4DE3-B99F-CA7120FE6BFB@nasby.net> References: <1293729972.1892.23804.camel@ebony> <4D1CC47E.7050207@kaltenbrunner.cc> <1293735853.1892.24886.camel@ebony> <795581D6-9C8B-4DE3-B99F-CA7120FE6BFB@nasby.net> Content-Type: text/plain; charset="UTF-8" Date: Fri, 31 Dec 2010 01:38:32 +0000 Message-ID: <1293759512.1892.29387.camel@ebony> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Server-Quench: ae5c66eb-147e-11e0-80b9-0022640b883e X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdxZQATClZOTQEd DAteCiN5VAwpPBRK HVkIKg5MJUcNSQVJ NksachtFawRbaVxS HGQLWlREUFx7Wmt/ aA4fZQRDZ1RPWwN0 U09WR1pVCwUmXm5n B012W0tyfwJBeXc+ ZEdnWHgVDRF/JkB7 FxxJFGkBMHphaTUf TUhYJQpJcANIfBlB agJ3XHBYLwdSbGoL PyYYHB0LBgAXEzVT SUk3IEpabUsQHzE6 LxMX 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.6 tagged_above=-5 required=5 tests=BAYES_00=-1.9, SARE_WEOFFER=0.3 X-Spam-Level: X-Archive-Number: 201012/2518 X-Sequence-Number: 177780 On Thu, 2010-12-30 at 18:47 -0600, Jim Nasby wrote: > On Dec 30, 2010, at 3:27 PM, Robert Haas 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 > > I think that comment is valid for the entire set of docs, actually. The document goes out of its way to avoid simple phrases like "replicated", but doesn't spell out exactly what is happening, ie: > > "Synchronous replication offers the ability to guarantee that all changes > made by a transaction have been transferred to at least one remote > standby server. This is an extension to the standard level of durability > offered by a transaction commit. This is referred to as semi-synchronous > replication." > > Reading that, I'm left with the sense that this isn't a simple matter of "Oh, the data has been replicated to the slave before commit returns", but nothing does a good job of clearly explaining what the distinction is and what it means. This section: > > "The guarantee we offer is that the application will not receive > explicit acknowledgement of the successful commit of a transaction until > the WAL data is known to be safely received by the standby. Hence this > mechanism is technically "semi synchronous" rather than "fully > synchronous" replication." > > does provide some enlightenment, but it's at the end of the section. I think it would be best if there was a section right at the beginning that talked about the data quality issue of sync replication and how we're avoiding it with our semi-sync solution. I'm happy to change the docs. It's the first draft... If that's the only problem you've got, then I'm feeling good. Any problems with the user interface itself? -- Simon Riggs http://www.2ndQuadrant.com/books/ PostgreSQL Development, 24x7 Support, Training and Services