Skip site navigation (1) Skip section navigation (2)

Re: Libpq driver: thread problem

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: <pgsql-odbc(at)postgresql(dot)org>,"Anoop Kumar" <anoopk(at)pervasive-postgres(dot)com>,"Magnus Hagander" <mha(at)sollentuna(dot)net>
Subject: Re: Libpq driver: thread problem
Date: 2005-07-14 16:13:36
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E4AC9261@ratbert.vale-housing.co.uk (view raw or flat)
Thread:
Lists: pgsql-odbc
 

> -----Original Message-----
> From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us] 
> Sent: 14 July 2005 17:02
> To: Dave Page
> Cc: pgsql-odbc(at)postgresql(dot)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

Responses

pgsql-odbc by date

Next:From: Bruce MomjianDate: 2005-07-14 16:16:50
Subject: Re: Libpq driver: thread problem
Previous:From: Bruce MomjianDate: 2005-07-14 16:02:00
Subject: Re: Libpq driver: thread problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group