Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 00A6B2E0055 for ; Mon, 7 Apr 2008 16:50:36 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 83586-02 for ; Mon, 7 Apr 2008 16:50:27 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by developer.postgresql.org (Postfix) with ESMTP id 68F572E0048 for ; Mon, 7 Apr 2008 16:50:30 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JixMK-0001Ts-8s for pgsql-performance@postgresql.org; Mon, 07 Apr 2008 19:50:28 +0000 Received: from frigga.summersault.com ([12.161.105.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Apr 2008 19:50:28 +0000 Received: from mark by frigga.summersault.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 07 Apr 2008 19:50:28 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-performance@postgresql.org From: Mark Stosberg Subject: per-review of PgBouncer / Slony design Date: Mon, 07 Apr 2008 15:50:19 -0400 Lines: 41 Message-ID: References: <20080407114446.43a1cc50@commandprompt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: frigga.summersault.com User-Agent: Thunderbird 2.0.0.12 (X11/20080227) In-Reply-To: <20080407114446.43a1cc50@commandprompt.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/72 X-Sequence-Number: 29565 > I would stick to proven postgresql technologies such as pgbouncer. Thanks for the fast recommendation, Joshua. I'll consider it. Our application is Slony-replicated web/db project with two slaves. Does this design seem sensible? - Run one pgbouncer server on the master, with settings to service the master and both slaves. - We already handle balancing traffic between the slaves separately, so that can remain unchanged. - Use Session Pooling both both the masters and the slaves. In theory, the slaves should just be doing transaction-less SELECT statements, so a more aggressive setting might be possible, but I believe there might be a "leak" in the logic where we create a temporary table on the slave in one case. - Redirect all application connections through pgbouncer ### From graphs we keep, we can see that the slaves currently use a max of about 64 connections...they are far from maxing out what's possible. So I was trying to think through if made sense to bother using the pgBouncer layer with them. I through of two potential reasons to still use it: - In the event of a major traffic spike on the web servers, pgbouncer would keep the number of db slots under control. - Potentially there's a performance gain in having PgBouncer hold the connections open. Does that analysis seem correct? For the master's pool size, I thought I would just choose a number that's a little larger that the daily max number of DB slots in use. Mark