Re: Connections - Postgres 9.2

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Connections - Postgres 9.2
Дата
Msg-id 6ad167db-a5eb-a80a-a832-f8bc117394d7@aklaver.com
обсуждение исходный текст
Ответ на Re: Connections - Postgres 9.2  (Lucas Possamai <drum.lucas@gmail.com>)
Ответы Re: Connections - Postgres 9.2  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
On 05/16/2016 01:28 PM, Lucas Possamai wrote:
> hmm.. thanks for all the answers guys...
>
>
> One more question: Those IDLE connections.. are using the server's
> resources?
> To solve that problem I would need a Pool connection, right?

Yes and no. If your application/clients are generating connections that
are not being closed then putting a pooler between the client and the
database just moves the problem to the pooler. In other words if the
client is asking for a connection from the pooler and then does not
close it then the pooler is going to have to add connections to deal
with subsequent connections. Now you can set a max number of connections
and reject new ones after that number, but that then means you may be
shutting out connections that need to get through. The first step in
dealing with this would be to determine what code is generating
connections and then not closing them. A good place to start would be:

http://www.postgresql.org/docs/9.5/static/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW

Table 27-3. pg_stat_activity View

That should give you an idea of what is creating the connections.


>
> Would the pool connection solve that IDLE connections? But more
> important than that, are the IDLE connections using the machine's
> resources ?

Yes a connection consumes resources.
>
>
> cheers


--
Adrian Klaver
adrian.klaver@aklaver.com


В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Ascii Elephant for text based protocols - Final
Следующее
От: Venkata Balaji N
Дата:
Сообщение: Re: Connections - Postgres 9.2