DB Connections

Started by Jobabout 11 years ago7 messagesgeneral
Jump to latest
#1Job
Job@colliniconsulting.it

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

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

#2Job
Job@colliniconsulting.it
In reply to: Job (#1)

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

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

#3Vick Khera
vivek@khera.org
In reply to: Job (#1)
Re: DB Connections

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?

#4Sameer Malve
malvesameer@gmail.com
In reply to: Vick Khera (#3)
Re: DB Connections

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:

Show quoted text

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?

#5Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Job (#1)
Re: DB Connections

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

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

#6John R Pierce
pierce@hogranch.com
In reply to: Sameer Malve (#4)
Re: DB Connections

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

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

#7John R Pierce
pierce@hogranch.com
In reply to: Job (#1)
Re: DB Connections

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

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