From: Michael Paquier <michael.paquier@gmail.com>
To: hmidi slim <hmidi.slim2@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: pool connection
Date: Fri, 29 Dec 2017 20:53:54 +0900
Message-ID: <20171229115354.GC1458@paquier.xyz> (raw)
In-Reply-To: <CAMsqVxuFJYubLmnyyLcjij1o=Pnss7_95VTkrThTUBvuza+zGA@mail.gmail.com>
References: <CAMsqVxuFJYubLmnyyLcjij1o=Pnss7_95VTkrThTUBvuza+zGA@mail.gmail.com>
On Fri, Dec 29, 2017 at 11:47:01AM +0100, hmidi slim wrote:
> I'm trying to understand the utility of pool connection, I found that it's
> useful to enhance the performance of a database. However I want to know if
> it is a good option to put a large number in max_connection option to
> handle a large number of connection in an app?
A couple of hundred connections is already a lot as a point of
contention is snapshot build, which is particularly painful for OLTP
workloads. If you reach a point where you need hundreds of connections,
I would recommend using pgbouncer. This will save your server much CPU
by minimizing the effects of connections still around but idle.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: michael.paquier@gmail.com, hmidi.slim2@gmail.com
Subject: Re: pool connection
In-Reply-To: <20171229115354.GC1458@paquier.xyz>
References: <CAMsqVxuFJYubLmnyyLcjij1o=Pnss7_95VTkrThTUBvuza+zGA@mail.gmail.com> <20171229115354.GC1458@paquier.xyz>
* 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