Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id B00211337B4F for ; Tue, 4 Jan 2011 14:40:55 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 24606-03 for ; Tue, 4 Jan 2011 18:40:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail148143.authsmtp.com (outmail148143.authsmtp.com [62.13.148.143]) by mail.postgresql.org (Postfix) with ESMTP id E76671337B47 for ; Tue, 4 Jan 2011 14:40:47 -0400 (AST) Received: from mail-c194.authsmtp.com (mail-c194.authsmtp.com [62.13.128.121]) by punt8.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id p04IebJc096328; Tue, 4 Jan 2011 18:40:37 GMT Received: from Sidney-Stratton.local (dsl081-245-111.sfo1.dsl.speakeasy.net [64.81.245.111]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2) with ESMTP id p04IeVN2039783; Tue, 4 Jan 2011 18:40:32 GMT Message-ID: <4D236999.4050905@postgresql.org> Date: Tue, 04 Jan 2011 10:40:25 -0800 From: Josh Berkus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2 MIME-Version: 1.0 To: Heikki Linnakangas CC: Stefan Kaltenbrunner , Simon Riggs , greg@2ndQuadrant.com, Hannu Krosing , Robert Haas , pgsql-hackers@postgresql.org Subject: Re: Sync Rep Design 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> <4D2038BB.7000504@enterprisedb.com> In-Reply-To: <4D2038BB.7000504@enterprisedb.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Server-Quench: 1da442c6-1832-11e0-80b9-0022640b883e X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdyZgscClZXSx8a IjsDFzNPUwg+PxkK BgUMOw5HJEYITQBc chkbOAIPd38VQxYD A2cKS1VcWllxU2Bx JQxVcw1cfEhKWhtr UUlWQFdQERpoT1wB AmdLNGdwdwZPf3Zz K0RhWnBaEkUuJEJ5 QB1SCGwOZmV9aWFK UF1Qd1FdbQNKfB1D blAtXHsONCtlM3Bw LC8aFBMcBw5qYB9E RApFF18KCWoGBT8z QXi8 X-Authentic-SMTP: 61633136333939.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: 201101/260 X-Sequence-Number: 178097 On 1/2/11 12:35 AM, Heikki Linnakangas wrote: > Very likely. A synchronous standby can bring the master to a halt, while > an asynchronous one is rather harmless. If I were a DBA, and the data > wasn't very sensitive, I would liberally hand out async privileges to my > colleagues to set up reporting standbys, test servers etc. But I would > *not* give them synchronous privileges, because sooner or later one > would go "hmm, I wonder what happens if I make this synchronous", or > haphazardly copy the config file from a synchronous standby. That would > either bring down the master, or act as a "fake" standby, acknowledging > commits before they're flushed to the real synchronous standby. Either > one would be bad. That's not "very likely". Shops with enough DBAs to actually have a heirarchy of database access are rare indeed; the average business has trouble employing *one* fulltime DBA. Also, you're mistaken if you think that DBA's wouldn't restrict the ability of development users to set up asynch connections; those have a significant impact on the production server as well. However, the possibility of *accidental* DOS is a bit more likely, per accidentally using the wrong config file. I don't think you can guard against that with permissions, though; if a DBA is copying the config file from a synchronous server accidentally, presumably he's copying the .pgpass file as well, and then the new server is identical to the legit synch rep servers as far as the master is concerned. So, again, I don't agree that a separate synchrep permission is useful, or warranted. However, your arguments *do* make me backpedal on the issue of having a list of synch rep roles on the master. I can easily imagine a DBA needing to rapidly disable synch rep if replication is failing, without taking the time to log in to several separate standbys, one or more of which might be improperly configured and inaccessible. I can't think of a simpler way to do that than having a synch_rep_roles configuration on the master. That would also handle control issues for the senior DBA, since you'd need superuser access to the master to modify it. --Josh Berkus