--enable-thread-safety broken + patch regressions

Поиск
Список
Период
Сортировка
От Lee Kindness
Тема --enable-thread-safety broken + patch regressions
Дата
Msg-id 16175.33574.361948.57279@kelvin.csl.co.uk
обсуждение исходный текст
Список 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.


--ELM1060323025-11567-2_--


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Lee Kindness
Дата:
Сообщение: Re: Release changes
Следующее
От: "Mark Cave-Ayland"
Дата:
Сообщение: Re: problem with RH7.3 Pg7.3.4 binaries