Re: libpq thread safety

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Manfred Spraul <manfred(at)colorfullife(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq thread safety
Date: 2004-02-11 21:54:29
Message-ID: 200402112154.i1BLsTk19004@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Manfred Spraul <manfred(at)colorfullife(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-02-11 21:58:50 Re: libpq thread safety
Previous Message Bruce Momjian 2004-02-11 21:49:11 Re: libpq thread safety