Re: Question regarding Perl, DBI, and fork()

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Allen Landsidel <all(at)biosys(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question regarding Perl, DBI, and fork()
Date: 2003-10-26 22:40:40
Message-ID: 20031026224040.GB27294@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Relaxin 2003-10-26 22:42:27 Question about the Internals
Previous Message Martijn van Oosterhout 2003-10-26 22:26:41 Re: Casing: bug?