Re: libpq enhancement for multi-process application

Поиск
Список
Период
Сортировка
От Daniele Orlandi
Тема Re: libpq enhancement for multi-process application
Дата
Msg-id 3A3F9672.7F7361BB@orlandi.com
обсуждение исходный текст
Ответ на libpq enhancement for multi-process application  (Sébastien Bonnet <bonseb@free.fr>)
Список pgsql-hackers
Sébastien Bonnet wrote:
> 
> Hi all, and mainly postresql developpers,
> 
> I've been reading old posts about the libpq interface related to multi-process
> application. The main problem being that after a fork, each process has a DB
> connexion, actually the same. If one closes it, the other one remains in a
> unknown or not stable state.

Uhm... I always thought that sharing the same socket between processes
is wrong.

My multi-process daemon works like apache with a pool of processes
everyone with its own connection to the DB. The connection is only
opened AFTER the fork and remains open as long as the process lives just
to avoid a new connection for each accept.

Bye!


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

Предыдущее
От: "Hiroshi Inoue"
Дата:
Сообщение: Is PQreset() proper ?
Следующее
От: mlw
Дата:
Сообщение: Sample databases?