Re: libpq thread safety - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: libpq thread safety
Date
Msg-id 200402112154.i1BLsTk19004@candle.pha.pa.us
Whole thread Raw
In response to Re: libpq thread safety  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Manfred Spraul <manfred@colorfullife.com> writes:
> > But what about kerberos: I'm a bit reluctant to add a forth mutex: what 
> > if kerberos calls gethostbyname or getpwuid internally?
> 
> Wouldn't help anyway, if some other part of the app also calls kerberos.
> I think we should just state that kerberos isn't thread safe and it
> isn't our problem.
> 
> For the same reason, the mutex in (eg) pqGethostbyname is an utter waste
> of code space.  It guarantees nothing.  Furthermore, any machine that
> claims to have a thread-safe libc will have either gethostbyname_r()
> or a thread-safe implementation of gethostbyname().  There is no value
> in our second-guessing this.

I have implemented this in CVS.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: libpq thread safety
Next
From: Bruce Momjian
Date:
Subject: Re: libpq thread safety