Re: Connection pooling

From: Steve Leibel <stevel(at)bluetuna(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Connection pooling
Date: 2001-01-26 18:29:10
Message-ID: v0421012eb69771e90c7a@[24.168.80.161]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 12:39 PM +0100 1/26/01, Gilles DAROLD wrote:
>Hi,
>
>Just to repeat that we have this stuff enabled using perl and mod_perl for a
>very
>long time. Just try to declare all your vars as global (without my or local)
>and
>see what's append between apache child process :-)
>
>But as I know Apache::DBI doesn't do db connexion pooling, this is a
>mistake.
>It just allows you to create persitante connexion. But you can declare
>multiple
>persistante connection and do a random access to each one if your really
>need
>to play with that. Personnaly I never had to use that, but I think that with
>a site
>with a large amout of simoultaneous user it can be usefull.

The point is that if two child processes share a connection (which is
actually just a TCP or Unix socket) then you have two writers to the
same output channel. This is a no-no, since data corruption can
result, just as if two writers share an open filehandle for writing.

It would in theory be possible for somebody to write a connection
pool package for Apache that included proper concurrency control.
However Apache::DBI doesn't do that.

Steve L

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-01-26 18:41:54 Re: beta3 Solaris 7 (SPARC) port report
Previous Message Felix König 2001-01-26 18:27:24 Trouble porting postgreSQL to WinNT