Re: ECPG and multiple threads

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: ECPG and multiple threads
Дата
Msg-id 20061110141904.GA17052@svana.org
обсуждение исходный текст
Ответ на ECPG and multiple threads  ("Adam" <adam.ciazynski@gmail.com>)
Список pgsql-general
On Fri, Nov 10, 2006 at 12:23:19AM -0800, Adam wrote:
> Hi,
>
> I'm porting an embedded-SQL application to PostgreSQL so embedded sql
> is a must for me. My application is multi-threaded. SQL queries are
> used by several threads. The program keeps terminating unexpectedly in
> deemingly "innocent" places.

Note, you might be able to make ECPG and libpq thread-safe, however
even then you *cannot* use the same connection simultaneously from
different threads. You will have to open a new connection for each
parallel connection you want to handle. Or use locking.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: Teodor Sigaev
Дата:
Сообщение: Re: tsearch2() with data from other table
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: AutoVacuum on demand?