Обсуждение: DB Connections

Поиск
Список
Период
Сортировка

DB Connections

От
Job
Дата:
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

DB Connections

От
Job
Дата:
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

Re: DB Connections

От
Vick Khera
Дата:

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?

Re: DB Connections

От
sameer malve ⎝⏠⏝⏠⎠
Дата:

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?

Re: DB Connections

От
Adrian Klaver
Дата:
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


Re: DB Connections

От
John R Pierce
Дата:
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



Re: DB Connections

От
John R Pierce
Дата:
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