Re: Libpq driver: thread problem

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: Libpq driver: thread problem
Дата
Msg-id E7F85A1B5FF8D44C8A1AF6885BC9A0E4AC9261@ratbert.vale-housing.co.uk
обсуждение исходный текст
Ответ на Libpq driver: thread problem  ("Dave Page" <dpage@vale-housing.co.uk>)
Список pgsql-odbc

> -----Original Message-----
> From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
> Sent: 14 July 2005 17:02
> To: Dave Page
> Cc: pgsql-odbc@postgresql.org; Anoop Kumar
> Subject: Re: [ODBC] Libpq driver: thread problem
>
> > After some discussion with Magnus Hagander, that is probably a red
> > herring. He recalls that --enable-thread-safety is needed
> on platforms
> > that don't have a thread safe API already - windows does as
> I'm sure you
> > know.
>
> I don't think that is correct  --- you do need that flag for
> libpq to be
> thread safe.  If the thread flag doesn't work on Win32, we need to fix
> it.  I know we applies some patches during 8.0 beta so it
> _should_ work,
> and if it doesn't we need to add it to the TODO list or fix it.
>
> The main issue with the flag, as I remember, is to allow multiple
> threads to open libpq connections.  If you don't do that, you
> don't need
> the flag.

In which case it definitely needs fixing. Which may be a non-trivial
task as pthreads on Windows is not currently used by PostgreSQL, and
didn't want to play last time I looked at it :-( However...

I did look at this very briefly before speaking to Magnus. The first
problem I ran into was that configure was insisting that posix signals
were needed to enable thread safety. Before I spend lots of time looking
at the code do you know if it is safe for me to assume our signal
emaulation will do that job in all the right places? If so, I guess it's
just a case of fixing the pthread detection and linker flags.

Regards, Dave

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Libpq driver: thread problem
Следующее
От: Marko Ristola
Дата:
Сообщение: Re: Libpq driver: thread problem