
> I know, this sucks, but, I don't see any other way, other than linking
> *ALL* libpq-using programs (including initdb and friends) with -K
pthread.

How about making a libpq.so (without pthread) and a thread safe
libpq_r.so ?

Andreas

Thu, 13 May 2004 09:54:02 +0200
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>
Re: threads stuff/UnixWare
--On Thursday, May 13, 2004 09:54:02 +0200 Zeugswetter Andreas SB SD 
<ZeugswetterA@spardat.at> wrote:

>
>> I know, this sucks, but, I don't see any other way, other than linking
>> *ALL* libpq-using programs (including initdb and friends) with -K
> pthread.
>
> How about making a libpq.so (without pthread) and a thread safe
> libpq_r.so ?
That's against the way this platform does things.  I.E. the only
library is libc.  All the other system supplied libs do the right thing
in the presence or absence of libthread in the image.

I did get a note from my SCO contacts that they are looking into how
to make it easier for stuff to be threads ready, but I don't expect
that to be ready for 7.5 release.

The -Kpthread on all libpq using programs is the easiest way FOR NOW.

Thanks,
LER

>
> Andreas



-- 
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
Thu, 13 May 2004 03:56:13 -0500
Larry Rosenman <ler@lerctr.org>
Re: threads stuff/UnixWare
Larry Rosenman <ler@lerctr.org> writes:
> I did get a note from my SCO contacts that they are looking into how
> to make it easier for stuff to be threads ready, but I don't expect
> that to be ready for 7.5 release.

> The -Kpthread on all libpq using programs is the easiest way FOR NOW.

Hmm.  If there is work happening at the platform level to improve
matters, then I'd definitely vote for taking the simplest solution
(ie -Kpthread everywhere) for now.  We can always do all that other
work later if nothing gets fixed; but why invest a lot of work for
what might be only a short-term problem?

			regards, tom lane

Thu, 13 May 2004 09:18:21 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: threads stuff/UnixWare 
--On Thursday, May 13, 2004 09:18:21 -0400 Tom Lane <tgl@sss.pgh.pa.us> 
wrote:

> Larry Rosenman <ler@lerctr.org> writes:
>> I did get a note from my SCO contacts that they are looking into how
>> to make it easier for stuff to be threads ready, but I don't expect
>> that to be ready for 7.5 release.
>
>> The -Kpthread on all libpq using programs is the easiest way FOR NOW.
>
> Hmm.  If there is work happening at the platform level to improve
> matters, then I'd definitely vote for taking the simplest solution
> (ie -Kpthread everywhere) for now.  We can always do all that other
> work later if nothing gets fixed; but why invest a lot of work for
> what might be only a short-term problem?
I agree.  the only issue is how to set up our makefiles to only do the
-Kpthread/-pthreads(gcc) flags on the client code, and not do it for
the backend itself.


>
> 			regards, tom lane



-- 
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
Thu, 13 May 2004 08:44:14 -0500
Larry Rosenman <ler@lerctr.org>
Re: threads stuff/UnixWare 
Larry Rosenman wrote:
-- Start of PGP signed section.
> 
> 
> --On Thursday, May 13, 2004 09:18:21 -0400 Tom Lane <tgl@sss.pgh.pa.us> 
> wrote:
> 
> > Larry Rosenman <ler@lerctr.org> writes:
> >> I did get a note from my SCO contacts that they are looking into how
> >> to make it easier for stuff to be threads ready, but I don't expect
> >> that to be ready for 7.5 release.
> >
> >> The -Kpthread on all libpq using programs is the easiest way FOR NOW.
> >
> > Hmm.  If there is work happening at the platform level to improve
> > matters, then I'd definitely vote for taking the simplest solution
> > (ie -Kpthread everywhere) for now.  We can always do all that other
> > work later if nothing gets fixed; but why invest a lot of work for
> > what might be only a short-term problem?
>
> [ added blank line here ] 
> I agree.  the only issue is how to set up our makefiles to only do the
> -Kpthread/-pthreads(gcc) flags on the client code, and not do it for
> the backend itself.

I think mixing a pgport that has thread flags with a backend that does
not is more risky than just compiling everything with the same thread
flags.

-- 
  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, Pennsylvania 19073

Thu, 13 May 2004 10:04:05 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: threads stuff/UnixWare
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Larry Rosenman wrote:
>> I agree.  the only issue is how to set up our makefiles to only do the
>> -Kpthread/-pthreads(gcc) flags on the client code, and not do it for
>> the backend itself.

> I think mixing a pgport that has thread flags with a backend that does
> not is more risky than just compiling everything with the same thread
> flags.

Can we get this straight: is -Kpthread a compile flag or just a link flag?
If the latter then it should not be needed in building the libpgport files.
If the former then adding it to LDFLAGS is the wrong thing.

			regards, tom lane

Thu, 13 May 2004 10:35:09 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: threads stuff/UnixWare 
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Larry Rosenman wrote:
> >> I agree.  the only issue is how to set up our makefiles to only do the
> >> -Kpthread/-pthreads(gcc) flags on the client code, and not do it for
> >> the backend itself.
> 
> > I think mixing a pgport that has thread flags with a backend that does
> > not is more risky than just compiling everything with the same thread
> > flags.
> 
> Can we get this straight: is -Kpthread a compile flag or just a link flag?
> If the latter then it should not be needed in building the libpgport files.
> If the former then adding it to LDFLAGS is the wrong thing.

-Kpthread is needed for both compile and link, and the PTHREAD_CFLAGS is
used for both compile and link phases.

-- 
  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, Pennsylvania 19073

Thu, 13 May 2004 11:07:21 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: threads stuff/UnixWare