Re: libpq_r

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Lee Kindness <lkindness(at)csl(dot)co(dot)uk>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq_r
Date: 2003-07-24 13:09:52
Message-ID: 9560000.1059052192@lerlaptop.lerctr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

--On Thursday, July 24, 2003 08:52:37 -0400 Bruce Momjian
<pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:

> Lee Kindness wrote:
>> Guys, take a look at what was done in libpq to make it
>> thread-safe... No locks! No overheaded - just using "proper" reentrant
>> functions...
>>
>> If we have libpq_r then we're making a complete hash of it all - being
>> reentrant is good, even if you're not using threads!
>>
>> Now, ecpg is another issue...
>>
>
> I think the issue is that using a threaded library to link into libpq
> could have locking stuff.
>
> My guess is that if the OS has separate threaded libs, we have to mimic
> that stuff.
possibly. On UnixWare, the original executable in the process needs to
have -K[p]thread
specified to get libthread included. I'll be adding -D_REENTRANT to the
libpq build for
UnixWare to make sure that libpq is threadsafe, but doesn't include the
thread library as
a pre-requisite per input from SCO.

BTW, Bruce, SCO OpenServer does NOT have threads.

LER

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

In response to

  • Re: libpq_r at 2003-07-24 12:52:37 from Bruce Momjian

Browse pgsql-hackers by date

  From Date Subject
Next Message Shridhar Daithankar 2003-07-24 13:11:40 Re:
Previous Message Bruce Momjian 2003-07-24 12:59:38 Re: