Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 6A4D71337B39 for ; Sun, 2 Jan 2011 06:40:07 -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 61640-09 for ; Sun, 2 Jan 2011 10:40:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail149056.authsmtp.com (outmail149056.authsmtp.com [62.13.149.56]) by mail.postgresql.org (Postfix) with ESMTP id C77441337990 for ; Sun, 2 Jan 2011 06:39:59 -0400 (AST) Received: from mail-c193.authsmtp.com (mail-c193.authsmtp.com [62.13.128.118]) by punt10.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id p02AdlYR029152; Sun, 2 Jan 2011 10:39:47 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 p02AdkDN090951; Sun, 2 Jan 2011 10:39:47 GMT Subject: Re: Sync Rep Design From: Simon Riggs To: Aidan Van Dyk Cc: Josh Berkus , Stefan Kaltenbrunner , Heikki Linnakangas , greg@2ndquadrant.com, Hannu Krosing , Robert Haas , pgsql-hackers@postgresql.org In-Reply-To: References: <1293729972.1892.23804.camel@ebony> <4D1CC47E.7050207@kaltenbrunner.cc> <1293735853.1892.24886.camel@ebony> <4D1D8B2F.5070001@2ndquadrant.com> <4D1DAB14.5000800@enterprisedb.com> <1293796137.1892.37313.camel@ebony> <4D1DCF5A.7070808@enterprisedb.com> <1293822959.1892.43164.camel@ebony> <4D1F332A.90306@kaltenbrunner.cc> <4D1FAD55.1090304@postgresql.org> <1293923322.1892.65820.camel@ebony> Content-Type: text/plain; charset="UTF-8" Date: Sun, 02 Jan 2011 10:39:45 +0000 Message-ID: <1293964785.1892.74319.camel@ebony> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Server-Quench: 9e9da52a-165c-11e0-97bb-002264978518 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdxZQATClZOTQEd DAteCiN5VAwpPBRK HVkIKg5MJUcNSQVJ NksafhtFaAdbZ1hf HGQLWlVEUV17Wmp/ bw0fZQRDZ1RPWwN0 U09WR1pVCwUmQRwD d0pFJmdyfgVPfX8+ ZkJqV3YVVRFzIRd4 QB9JFGsDNnphaTUf TUlfJVFJcANIfBlB Y1d3UXIFLwdSbGoL PyYYHB0LBgAXEzVT SUk3IEpabUsQHzE6 L0N4 X-Authentic-SMTP: 61633235383639.1014: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: 201101/57 X-Sequence-Number: 177894 On Sat, 2011-01-01 at 22:11 -0500, Aidan Van Dyk wrote: > On Sat, Jan 1, 2011 at 6:08 PM, Simon Riggs wrote: > > On Sat, 2011-01-01 at 14:40 -0800, Josh Berkus wrote: > > > >> Standby in general deals with the A,D,R triangle (Availability, > >> Durability, Response time). "Any one" configuration is the A,R > >> configuration, and the only reason to go out with it for 9.1 is > >> because it's simpler to implement than the D,R configuration (all > >> standbys must ack). > > > > Nicely put. Not the "only reason" though... > > > > As I showed earlier, the AR gives you 99.999% availability and the DR > > gives you 94% availability, considering a 3 server config. If you add > > more servers, the availability of the DR option gets much worse, very > > quickly. > > > > The performance of AR is much better also, and stays same or better as > > cluster size increases. DR choice makes performance degrade as cluster > > size increases, since it works at the speed of the slowest node. > > I'm all for getting first-past-post in for 9.1. Otherwise I fear > we'll get nothing. > > Stephen and I will only be able to use 1 sync slave, the "DR-site" > one. No, the AR and DR options are identical with just one sync standby. You've been requesting the DR option with 2 standbys, which is what gives you 94% availability. > That's fine. I can live with it, and make my local slave be > async. Or replicate the FS/block under WAL. I can monitor the **** > out of it, and unless it goes "down", it should easily be able to keep > up with the remote sync one beind a slower WAN link. > > And I think both Stephen and I understand your availability math. > We're not arguing that the 1st past post both gives better query > availabiliyt, and cluster scale performance. > > But when the primary datacenter servers are dust in the crater (or > boats in the flood, or ash in the fire), I either keep my job, or I > don't. And that depends on whether there is a chance I (my database > system) confirmed a transaction that I can't recover. I'm not impressed. You neglect to mention that Oracle and MySQL would put you in exactly the same position. You also neglect to say that if the local standby goes down, you were advocating a design that would take the whole application down. If you actually did what you have been suggesting, and the cluster went down as it inevitably would do, once your colleagues realise that you knowingly configured the cluster to have only 94% availability, you won't have a job anymore, you'll be escorted off the premises while shouting "but while it was down, it lost no data". When that never happens, thank me. There are people that need more durability than availability, but not many. If the database handles high value transactions, they very probably want it to keep on processing high value transactions. You'll have the choice of how to configure it, because of me listening to other people's views and selecting only the ideas that make sense. -- Simon Riggs http://www.2ndQuadrant.com/books/ PostgreSQL Development, 24x7 Support, Training and Services