From: | Lee Kindness <lkindness(at)csl(dot)co(dot)uk> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Lee Kindness <lkindness(at)csl(dot)co(dot)uk>, pgsql-hackers(at)postgresql(dot)org |
Subject: | --enable-thread-safety broken + patch regressions |
Date: | 2003-08-05 10:12:54 |
Message-ID: | 16175.33574.361948.57279@kelvin.csl.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Bruce, the changes you made yesterday to configure for
--enable-thread-safety have broken the build, at least for Linux on
Redhat 9.
Also, I took the opportunity to look at port/threads.c. It is missing
important functionality compaired to the patch I originally
submitted. For getpwuid_r, gethostbyname_r and strerror_r there are
three possible scenarios:
1. The OS doesn't have it (but the non _r function can still be thread
safe (i.e. HPUX 11)).
2. The OS has it, but the implmentation doesn't match the POSIX spec.
3. The OS has it, and the implmentation matches the POSIX spec.
Case 3 is not being considered. In my original patch this was handled
by the pqGetpwuid etc functions simply being defined to getpwuid_r
(except for pqStrerror).
I remember discussing with you that the implementation of pqStrerror
didn't really need the distinction between the two _r
versions. However I think the others do, and the native/correct _r
calls should be #defined in if they match the POSIX spec.
It's also worth considering that when the _r function is available AND
the normal function is also thread-safe then the _r version should
still be used since it has a clean API which removes unneeded locking
within the old function.
I've still got the latest (and earlier with some configure work)
patches I submitted up at:
http://services.csl.co.uk/postgresql/
Thanks, Lee.
From | Date | Subject | |
---|---|---|---|
Next Message | Larry Rosenman | 2003-08-05 10:17:25 | Re: Release changes |
Previous Message | Magnus Naeslund(w) | 2003-08-05 09:58:48 | Re: problem with RH7.3 Pg7.3.4 binaries |