Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id D31131337B7A for ; Sat, 1 Jan 2011 15:42:09 -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 31716-09; Sat, 1 Jan 2011 19:42:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og127.obsmtp.com (exprod7og127.obsmtp.com [64.18.2.210]) by mail.postgresql.org (Postfix) with SMTP id 9A5D11337B5B; Sat, 1 Jan 2011 15:42:01 -0400 (AST) Received: from source ([209.85.215.179]) (using TLSv1) by exprod7ob127.postini.com ([64.18.6.12]) with SMTP ID DSNKTR+DiBORqbSLYdM0Q1hT5gXIQLqsDULB@postini.com; Sat, 01 Jan 2011 11:42:02 PST Received: by eyg24 with SMTP id 24so5683266eyg.10 for ; Sat, 01 Jan 2011 11:41:59 -0800 (PST) Received: by 10.213.4.67 with SMTP id 3mr14416501ebq.46.1293910919300; Sat, 01 Jan 2011 11:41:59 -0800 (PST) Received: from [192.168.1.183] (dsl-hkibrasgw2-ff7ac300-240.dhcp.inet.fi [88.195.122.240]) by mx.google.com with ESMTPS id b52sm13339812eei.1.2011.01.01.11.41.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 01 Jan 2011 11:41:58 -0800 (PST) Message-ID: <4D1F8383.8020809@enterprisedb.com> Date: Sat, 01 Jan 2011 21:41:55 +0200 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.1.15) Gecko/20101030 Icedove/3.0.10 MIME-Version: 1.0 To: Hannu Krosing CC: Simon Riggs , greg@2ndQuadrant.com, Josh Berkus , Robert Haas , Stefan Kaltenbrunner , 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> <4D1E4897.1050400@2ndquadrant.com> In-Reply-To: <4D1E4897.1050400@2ndquadrant.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.2 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3 X-Spam-Level: X-Archive-Number: 201101/30 X-Sequence-Number: 177867 On 31.12.2010 23:18, Hannu Krosing wrote: > On 31.12.2010 13:40, Heikki Linnakangas wrote: >> That thread makes no mention of how to specify which standbys are >> synchronous and which are not. > The simplest way would be to have separate database users for sync and > async standbys ? > > That would allow any standby with right credentials act as a sync user, > and those who are not eligible are not accepted even if they try to act > as "a synchronity (?) provider". Hmm, access control... We haven't yet discussed what privileges a standby needs to become synchronous. Perhaps it needs to be a separate privilege that can be granted, in addition to the replication privilege? Robert's suggestion of using the roles instead of server names would also solve that. With that you would list the roles in synchronous_standbys, and no-one else could become a synchronous standby. The downside is that if you want to have two standbys in the mode that it's enough that either one acknowledges a commit, they would have to use the same user account. If we don't adopt Robert's suggestion, do we want to restrict what standby name a user can claim, to stop one standby from spoofing another? -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com