Re: threads stuff/UnixWare

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: threads stuff/UnixWare
Date: 2004-05-13 02:14:38
Message-ID: A922ABBBF0DBFDBEF5B29304@lerlaptop.lerctr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

--On Wednesday, May 12, 2004 21:55:40 -0400 Bruce Momjian
<pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:

> Larry Rosenman wrote:
>> > [ Sorry I have been away from email today. ]
>> >
>> > Larry, now that I have put the thread testing into configure, I am
>> > ready to deal with Unixware. In fact I posted to the list asking you
>> > about it but was too lazy to look up your email address.
>> >
>> > Anyway, I think the only solution is going to be to use the -K flag on
>> > all compiles on that platform if you want threads, so anything that
>> > uses libpq will need it. We don't have a client-level flags option at
>> > this point, but we can add it, or just the flag for the backend
>> > compile too.
>> I think a client-level flag would be best, that way the backend doesn't
>> get the wrapped functions from libthread.
>>
>> Can you do the patch?
>
> OK. Can someone think of a clean way to add a flag to everything but
> the backend build? Hold, what about /port. Larry, if we compile
> anything with threads does everything that links with that object file
> require the flag, even if there are no thread flags in the object file?
> I don't think so, but I am just checking. Actually, my bet is that it
> might do that because if it didn't, there would be no problem with using
> that flag on the backend because there are no threading calls in there.
Yes, there would still be the overhead, because the functions that
libthread wraps would go through that overhead since libthread does it's
magic at _ini time.

Y'all were concerned with overhead in previous discussions.

If you want to link the backend with -Kpthread, you can, but basically the
client code (initdb, et al) should be -Kpthread, and the backend should NOT
since there are no threads calls in the backend.

>
> I am afraid of libpgport. Those object files get used by the backend,
> and by the client stuff. Larry can -K and non-K object files be mixed
> in the same binary?
Yes, they can.

But, you MUST link ANY pthread_* using code with -K pthread.

See above discussion.

--
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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-05-13 02:24:52 Re: Subtle pg_dump problem...
Previous Message Christopher Kings-Lynne 2004-05-13 01:58:17 Re: Subtle pg_dump problem...