Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 80D346349B4; Thu, 1 Apr 2010 10:09:56 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 04013-04; Thu, 1 Apr 2010 13:09:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og122.obsmtp.com (exprod7og122.obsmtp.com [64.18.2.22]) by mail.postgresql.org (Postfix) with SMTP id A7943632A78; Thu, 1 Apr 2010 10:09:44 -0300 (ADT) Received: from source ([74.125.78.147]) by exprod7ob122.postini.com ([64.18.6.12]) with SMTP ID DSNKS7SbFkA5h0MZh/INSDxhES9TWPbB7xQK@postini.com; Thu, 01 Apr 2010 06:09:44 PDT Received: by ey-out-1920.google.com with SMTP id 4so67052eyg.34 for ; Thu, 01 Apr 2010 06:09:41 -0700 (PDT) Received: by 10.213.58.203 with SMTP id i11mr448105ebh.0.1270127381597; Thu, 01 Apr 2010 06:09:41 -0700 (PDT) Received: from [192.168.1.117] (dsl-hkibrasgw2-ff67c300-165.dhcp.inet.fi [88.195.103.165]) by mx.google.com with ESMTPS id 14sm4433982ewy.10.2010.04.01.06.09.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 01 Apr 2010 06:09:40 -0700 (PDT) Message-ID: <4BB49B0C.1050901@enterprisedb.com> Date: Thu, 01 Apr 2010 16:09:32 +0300 From: Heikki Linnakangas Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: Fujii Masao CC: Robert Haas , PostgreSQL-development , pgsql-docs@postgresql.org Subject: Re: [HACKERS] Streaming replication document improvements References: <3f0b79eb1003300152g5327eb47w8f9aecae6002b215@mail.gmail.com> <4BB3B2ED.5080606@enterprisedb.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.513 tagged_above=-10 required=5 tests=AWL=-0.675, BAYES_00=-2.599, FS_REPLICA=1.041, SARE_SPEC_REPLICA=0.72 X-Spam-Level: X-Archive-Number: 201004/3 X-Sequence-Number: 5402 Fujii Masao wrote: > On Thu, Apr 1, 2010 at 11:00 AM, Robert Haas wrote: >> On Wed, Mar 31, 2010 at 9:58 PM, Fujii Masao wrote: >>> You mean that we should change replication connection not to consume >>> superuser_reserved_connections slots in 9.0? >> Yes. I think it's good that walsenders can use the superuser reserved slots, that way a client that opens max_connections connections can't block out standby servers from connecting. > Preventing superuser connections from consuming superuser_reserved_connections > slots seems strange for me. So I'm leaning toward just removing superuser > privilege from replication connection again. Thought? That would be good, but I fear it's a bigger change than we should be doing at this point. How about we adjust the backends math a bit: Currently: ReservedBackends = superuser_reserved_connections MaxBackends = max_connections + autovacuum_max_workers + 1; Proposal: ReservedBackends = superuser_reserved_connections + max_wal_senders MaxBackends = max_connections + autovacuum_max_workers + max_wal_senders + 1 So we implicitly reserve a slot and a superuser reserved slot for each walsender. Walsenders use the slots reserved for superusers, but if you set superuser_reserved_connections=3, there's still always at least three slots available for superuser to log in with psql, even if the maximum number of walsenders are connected. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com