X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id C4C4CD1C4D0 for ; Thu, 24 Jul 2003 13:10:02 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 35323-08 for ; Thu, 24 Jul 2003 10:09:21 -0300 (ADT) Received: from lerami.lerctr.org (lerami.lerctr.org [207.158.72.11]) by svr1.postgresql.org (Postfix) with ESMTP id 86C20D1C4B7 for ; Thu, 24 Jul 2003 10:10:00 -0300 (ADT) Received: from lerlaptop.lerctr.org (lerlaptop.lerctr.org [207.158.72.14]) (authenticated bits=0) by lerami.lerctr.org (8.12.9/8.12.9/20030515) with ESMTP id h6OD9qNQ027490; Thu, 24 Jul 2003 08:09:52 -0500 (CDT) Date: Thu, 24 Jul 2003 08:09:52 -0500 From: Larry Rosenman To: Bruce Momjian , Lee Kindness Cc: PostgreSQL Development Subject: Re: libpq_r Message-ID: <9560000.1059052192@lerlaptop.lerctr.org> In-Reply-To: <200307241252.h6OCqbJ14215@candle.pha.pa.us> References: <200307241252.h6OCqbJ14215@candle.pha.pa.us> X-Mailer: Mulberry/3.1.0b4 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/718 X-Sequence-Number: 41323 --On Thursday, July 24, 2003 08:52:37 -0400 Bruce Momjian 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@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749