pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Niels Kristian Schjødt <nielskristian@autouncle.com>
To: Kevin Grittner <kgrittn@ymail.com>
Cc: Craig James <cjames@emolecules.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: New server setup
Date: Tue, 5 Mar 2013 18:11:48 +0100
Message-ID: <2565FD8E-B7AD-4FCD-AB59-F16401FBD140@autouncle.com> (raw)
In-Reply-To: <1362501244.18199.YahooMailNeo@web162905.mail.bf1.yahoo.com>
References: <4D6D1410-2208-4DAA-BD64-69BE1FD94E55@autouncle.com>
	<CAFwQ8rcA7xuPLXLXxKnz6AGfTit0iwFByM9ypfe-GfQmH0rvDA@mail.gmail.com>
	<06578781-EDBB-4BA9-B926-60491EBA5907@autouncle.com>
	<1362501244.18199.YahooMailNeo@web162905.mail.bf1.yahoo.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

Thanks, that was actually what I just ended up doing yesterday. Any suggestion how to tune pgbouncer?

BTW, I have just bumped into an issue that caused me to disable pgbouncer again actually. My web application is querying the database with a per request based SEARCH_PATH. This is because I use schemas to provide country based separation of my data (e.g. english, german, danish data in different schemas). I have pgbouncer setup to have a transactional behavior (pool_mode = transaction) - however some of my colleagues complained that it sometimes didn't return data from the right schema set in the SEARCH_PATH - you wouldn't by chance have any idea what is going wrong wouldn't you?

#################### pgbouncer.ini
[databases]
production =

[pgbouncer]

logfile = /var/log/pgbouncer/pgbouncer.log
pidfile = /var/run/pgbouncer/pgbouncer.pid
listen_addr = localhost
listen_port = 6432
unix_socket_dir = /var/run/postgresql
auth_type = md5
auth_file = /etc/pgbouncer/userlist.txt
admin_users = postgres
pool_mode = transaction
server_reset_query = DISCARD ALL
max_client_conn = 500
default_pool_size = 20
reserve_pool_size = 5
reserve_pool_timeout = 10
#####################


Den 05/03/2013 kl. 17.34 skrev Kevin Grittner <kgrittn@ymail.com>:

> Niels Kristian Schjødt <nielskristian@autouncle.com> wrote:
> 
>> So my question is, should I also get something like pgpool2 setup
>> at the same time? Is it, from your experience, likely to increase
>> my throughput a lot more, if I had a connection pool of eg. 20
>> connections, instead of 300 concurrent ones directly?
> 
> In my experience, it can make a big difference.  If you are just
> using the pooler for this reason, and don't need any of the other
> features of pgpool, I suggest pgbouncer.  It is a simpler, more
> lightweight tool.
> 
> -- 
> Kevin Grittner
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company



-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (38+ messages)  latest in thread

Message-ID: <2565FD8E-B7AD-4FCD-AB59-F16401FBD140@autouncle.com>
Permalink:  ../2565FD8E-B7AD-4FCD-AB59-F16401FBD140@autouncle.com/
Also on:    postgresql.org/message-id/2565FD8E-B7AD-4FCD-AB59-F16401FBD140@autouncle.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: nielskristian@autouncle.com, kgrittn@ymail.com, cjames@emolecules.com
  Subject: Re: New server setup
  In-Reply-To: <2565FD8E-B7AD-4FCD-AB59-F16401FBD140@autouncle.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox