Re: New server setup

From: "Benjamin Krajmalnik" <kraj(at)servoyant(dot)com>
To: Niels Kristian Schjødt <nielskristian(at)autouncle(dot)com>, "Kevin Grittner" <kgrittn(at)ymail(dot)com>
Cc: "Craig James" <cjames(at)emolecules(dot)com>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: New server setup
Date: 2013-03-05 18:03:44
Message-ID: F4E6A2751A2823418A21D4A160B6898892BB00@fletch.stackdump.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Set it to use session. I had a similar issue having moved one of the components of our app to use transactions, which introduced an undesired behavior.

-----Original Message-----
From: pgsql-performance-owner(at)postgresql(dot)org [mailto:pgsql-performance-owner(at)postgresql(dot)org] On Behalf Of Niels Kristian Schjødt
Sent: Tuesday, March 05, 2013 10:12 AM
To: Kevin Grittner
Cc: Craig James; pgsql-performance(at)postgresql(dot)org
Subject: Re: [PERFORM] New server setup

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(at)ymail(dot)com>:

> Niels Kristian Schjødt <nielskristian(at)autouncle(dot)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(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Niels Kristian Schjødt 2013-03-05 18:27:32 Re: New server setup
Previous Message Jeff Janes 2013-03-05 17:46:34 Re: Are bitmap index scans slow to start?