Re: Question regarding Perl, DBI, and fork() - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Question regarding Perl, DBI, and fork()
Date
Msg-id 20031026224040.GB27294@svana.org
Whole thread Raw
In response to Question regarding Perl, DBI, and fork()  (Allen Landsidel <all@biosys.net>)
Responses Re: Question regarding Perl, DBI, and fork()
List pgsql-general
On Sun, Oct 26, 2003 at 03:04:29PM -0500, Allen Landsidel wrote:
> Can the children (safely) use this handle to run database queries, or
> should I just consider the handle garbage?  I didn't want to "just try and
> see" because there's always the possibility it could work "by accident"
> during the low-load testing, and fail at some other time.

No, you can't. Even multithread programs can't use the same connection at
the same time (they can if serialised or if they use different connections).

Now, getting rid of the handle without it closing the connection would be a
trick.
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> "All that is needed for the forces of evil to triumph is for enough good
> men to do nothing." - Edmond Burke
> "The penalty good people pay for not being interested in politics is to be
> governed by people worse than themselves." - Plato

Attachment

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Casing: bug?
Next
From: "James Moe"
Date:
Subject: Re: no records returned