Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 4709C1337B7A for ; Sat, 1 Jan 2011 15:03:46 -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 93841-02 for ; Sat, 1 Jan 2011 19:03:39 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail149055.authsmtp.co.uk (outmail149055.authsmtp.co.uk [62.13.149.55]) by mail.postgresql.org (Postfix) with ESMTP id 96B841337B5B for ; Sat, 1 Jan 2011 15:03:37 -0400 (AST) Received: from mail-c194.authsmtp.com (mail-c194.authsmtp.com [62.13.128.121]) by punt9.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id p01J3Xi8092387; Sat, 1 Jan 2011 19:03:33 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 p01J3VWW029049; Sat, 1 Jan 2011 19:03:31 GMT Subject: Re: Sync Rep Design From: Simon Riggs To: Stefan Kaltenbrunner Cc: Robert Haas , Jeff Janes , pgsql-hackers@postgresql.org In-Reply-To: <4D1F6938.1090101@kaltenbrunner.cc> References: <1293729972.1892.23804.camel@ebony> <4D1CC47E.7050207@kaltenbrunner.cc> <1293735853.1892.24886.camel@ebony> <4D1CEEAF.8050209@kaltenbrunner.cc> <1293744235.1892.26478.camel@ebony> <4D1D93F1.80602@kaltenbrunner.cc> <1293791171.1892.36233.camel@ebony> <4D1F3437.10503@kaltenbrunner.cc> <4D1F4453.50903@kaltenbrunner.cc> <1293900957.1892.60412.camel@ebony> <4D1F60B4.1060408@kaltenbrunner.cc> <1293902960.1892.61053.camel@ebony> <4D1F6938.1090101@kaltenbrunner.cc> Content-Type: text/plain; charset="UTF-8" Date: Sat, 01 Jan 2011 19:03:30 +0000 Message-ID: <1293908610.1892.62786.camel@ebony> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Server-Quench: d365382b-15d9-11e0-80b9-0022640b883e X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdxZQATClZOTQEd DAteCiN5VAwpPBRK HVkIKg5MJUcNSQVJ NksachtFaARbZ1hf HGQLWlVEUVR7WWB/ aAsfZQRDZ1RPWwN0 U09WR1pVCwUmQRwA fB14NX5ydQxGfHc+ ZEdjV3IVCEd8cEV1 QBxJFGhSbHphaTUf TUhYJQpJcANIfBlB agJ3XHBYLwdSbGoL PyYYHB0LBgAXEzVT SUk3IEpabUsQHzE6 L7Nd 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 X-Spam-Level: X-Archive-Number: 201101/27 X-Sequence-Number: 177864 On Sat, 2011-01-01 at 18:49 +0100, Stefan Kaltenbrunner wrote: > hmm maybe my "surviving" standbys(the case I'm wondering about is > whole > datacenter failures which might take out more than just the master) > was > not clear - consider three boxes, one master and two standby and > semisync replication(ie any one of the standbys is enough to reply). > > 1. master fsyncs wal > 2. standby #1 fsyncs and replies > 3. master confirms commit > 4. desaster strikes and destroys master and standby #1 while standby > m2 > never had time to apply the change(IO/CPU load, latency, whatever) > 5. now you have a sync standby that is missing something that was > commited on the master and confirmed to the client and no way to > verify > that this thing happened (same problem with more than two standbys - > as > long as you lose ONE standby and the master at the same time you will > never be sure) This is obvious misconfiguration that anybody with HA experience would spot immediately. If you have local standbys then you should mark them as not available for sync rep, as described in the docs I've written. > what is it that I'm missing here? The fact that we've discussed this already and agreed to do 9.1 with quorum_commit = 1. I proposed making this a parameter; other solutions were also proposed, but it was considered too complex for this release. This is a trade-off between availability and data guarantees. MySQL and Oracle "suffer" from exactly this "problem". DB2 supports only one master and SQLServer doesn't have sync rep at all. -- Simon Riggs http://www.2ndQuadrant.com/books/ PostgreSQL Development, 24x7 Support, Training and Services