Re: libpq enhancement for multi-process application

From: Daniele Orlandi <daniele(at)orlandi(dot)com>
To: Sébastien Bonnet <bonseb(at)free(dot)fr>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: libpq enhancement for multi-process application
Date: 2000-12-19 17:10:10
Message-ID: 3A3F9672.7F7361BB@orlandi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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!

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Masto 2000-12-19 18:01:56 Re: performance modality in 7.1 for large text attributes?
Previous Message Sébastien Bonnet 2000-12-19 16:23:46 Re: libpq enhancement for multi-process application