Thread: DB Connections
Hello, i have just installed (on a Centos 6.5 x64 machine) Postgresql 9 latest stable version. The application i use need lots of static DB connections: in the 9 version, how many connections can be declared in postgresql.conf? I searched for a max number but i noticed it is not specified. Thank you, Francesco
Hello, i have just installed (on a Centos 6.5 x64 machine) Postgresql 9 latest stable version. The application i use need lots of static DB connections: in the 9 version, how many connections can be declared in postgresql.conf? I searched for a max number but i noticed it is not specified. Thank you, Francesco
On Fri, Mar 13, 2015 at 5:59 AM, Job <Job@colliniconsulting.it> wrote:
The application i use need lots of static DB connections: in the 9 version, how many connections can be declared in postgresql.conf?
I searched for a max number but i noticed it is not specified.
It depends on how much shared memory you give to the postgres process. How many are you looking to have?
Hello ,
Just use pgtune utility it will give an o/p of u r postgres.conf depending on your machine hardware .
Regards,
Sameer
On Mar 13, 2015 5:45 PM, "Vick Khera" <vivek@khera.org> wrote:
On Fri, Mar 13, 2015 at 5:59 AM, Job <Job@colliniconsulting.it> wrote:The application i use need lots of static DB connections: in the 9 version, how many connections can be declared in postgresql.conf?
I searched for a max number but i noticed it is not specified.
It depends on how much shared memory you give to the postgres process. How many are you looking to have?
On 03/13/2015 02:59 AM, Job wrote: > Hello, > > i have just installed (on a Centos 6.5 x64 machine) Postgresql 9 latest stable version. > > The application i use need lots of static DB connections: in the 9 version, how many connections can be declared in postgresql.conf? > I searched for a max number but i noticed it is not specified. Without some concrete information this will difficult to answer. 1) How many is lots? 2) Why do you need static connections? 3) What are the hardware specifications for your machine? > > Thank you, > Francesco > -- Adrian Klaver adrian.klaver@aklaver.com
On 3/13/2015 6:51 AM, sameer malve ⎝⏠⏝⏠⎠ wrote: > Just use pgtune utility it will give an o/p of u r postgres.conf > depending on your machine hardware . I find on newer large hardware, pg_tune makes some over-the-top choices. -- john r pierce 37N 122W somewhere on the middle of the left coast
On 3/13/2015 2:59 AM, Job wrote: > The application i use need lots of static DB connections if lots is much over a 100 or so, I'd strongly advise using a connection pooler like pgbouncer or whatever is built into your language framework (for instance, Java frameworks like Tomcat have built in connection pools), and configuring your app to grab a connection from the pool, do a transaction and release the connection. -- john r pierce 37N 122W somewhere on the middle of the left coast