Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 03BB76316A4 for ; Sat, 24 Jul 2010 03:36:35 -0300 (ADT) 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 19920-03 for ; Sat, 24 Jul 2010 06:36:27 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [202.4.227.11]) by mail.postgresql.org (Postfix) with ESMTP id B03AC62DBEC for ; Sat, 24 Jul 2010 03:36:27 -0300 (ADT) Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by www.postnewspapers.com.au (Postfix) with ESMTP id 5C6127D32B; Sat, 24 Jul 2010 14:36:17 +0800 (WST) Received: from localhost (localhost [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 1CB8FAF6C1; Sat, 24 Jul 2010 14:33:24 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (mail.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id cFSDVUHQ7t3Y; Sat, 24 Jul 2010 14:33:19 +0800 (WST) Received: from [10.1.1.6] (124-168-255-56.dyn.iinet.net.au [124.168.255.56]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id E91C2AF5C7; Sat, 24 Jul 2010 14:33:18 +0800 (WST) Message-ID: <4C4A89E3.5040607@postnewspapers.com.au> Date: Sat, 24 Jul 2010 14:36:19 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: Greg Smith CC: Robert Haas , "pgsql-performance@postgresql.org" Subject: Re: Pooling in Core WAS: Need help in performance tuning. References: <4C37791C0200002500033379@gw.wicourts.gov> <4C37CBFB.1000800@agliodbs.com> <4C37EA1D.6000008@postnewspapers.com.au> <4C38BF03.6060503@agliodbs.com> <19244.1278787866@sss.pgh.pa.us> <4C3AF564.5030204@postnewspapers.com.au> <82DAA0BC-52E8-4279-81DF-14373755A42F@richrelevance.com> <4c49bb81.17bb720a.42c2.1de8@mx.google.com> <4C4A78BC.2020101@2ndquadrant.com> In-Reply-To: <4C4A78BC.2020101@2ndquadrant.com> X-Enigmail-Version: 1.0.1 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=-0.011 tagged_above=-10 required=5 tests=BAYES_20=-0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/349 X-Sequence-Number: 39738 On 24/07/10 13:23, Greg Smith wrote: > Joshua Tolley wrote: >> Relatively minor, but it would be convenient to avoid having to query >> $external_pooler to determine the client_addr of an incoming connection. >> > > You suggest this as a minor concern, but I consider it to be one of the > most compelling arguments in favor of in-core pooling. A constant pain > with external poolers is the need to then combine two sources of data in > order to track connections fully, which is something that everyone runs > into eventually and finds annoying. It's one of the few things that > doesn't go away no matter how much fiddling you do with pgBouncer, it's > always getting in the way a bit. And it seems to seriously bother > systems administrators and developers, not just the DBAs. Putting a pooler in core won't inherently fix this, and won't remove the need to solve it for cases where the pooler can't be on the same machine. 9.0 has application_name to let apps identify themselves. Perhaps a "pooled_client_ip", to be set by a pooler rather than the app, could be added to address this problem in a way that can be used by all poolers new and existing, not just any new in-core pooling system. If a privileged set of pooler functions is was considered, as per my other recent mail, the pooler could use a management connection to set the client ip before handing the connection to the client, so the client couldn't change pooled_client_ip its self by accident or through malice. But even without that, it'd be awfully handy. -- Craig Ringer