Re: Monitoring number of backends

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Monitoring number of backends
Дата
Msg-id 20131023021117.GJ2706@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Monitoring number of backends  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
* John R Pierce (pierce@hogranch.com) wrote:
> On 10/22/2013 1:13 PM, andy wrote:
> >No, actually, I don't think my connect overhead is huge.  My
> >apache and postgres are on the same box, and it connects using
> >unix socket. Perhaps if my apache on db were on different boxes it
> >would be a problem.
>
> each postgres connection, if you're not using a pool, requires a
> fork() of the postgres process.  fork is inherently an expensive
> process, especially for a moderately large and fairly complex piece
> of software like postgresql.

As Tom points out, it's really PG that makes the new connections slow;
fork(), while it can be slow on some platforms, really is small potatos
compared to PG opening a database, populating caches, etc.

    Thanks,

        Stephen

Вложения

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

Предыдущее
От: James Sewell
Дата:
Сообщение: Re: pg_dumpall from a script
Следующее
От: BladeOfLight16
Дата:
Сообщение: Re: Bug? Function with side effects not evaluated in CTE