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

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Question regarding Perl, DBI, and fork()
Дата
Msg-id 20031026224040.GB27294@svana.org
обсуждение исходный текст
Ответ на Question regarding Perl, DBI, and fork()  (Allen Landsidel <all@biosys.net>)
Ответы Re: Question regarding Perl, DBI, and fork()
Список 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

Вложения

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Casing: bug?
Следующее
От: "James Moe"
Дата:
Сообщение: Re: no records returned