No threading option for FreeBSD 4.X in 7.5

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: No threading option for FreeBSD 4.X in 7.5
Date: 2004-04-26 00:26:31
Message-ID: 200404260026.i3Q0QVo09058@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

FreeBSD 4.X will not support --enable-thread-safety in 7.5. Let me
explain why.

In 7.4, if we didn't have a *_r function, and the non-*_r function was
not thread-safe, we called the non-*_r function with thread locks and
copied the value into the passed storage pointer. I thought that was
OK, but several people pointed out that this was not safe if another
part of the program called the non-*_r function at the same time. I
only understood the ramifications of that after 7.4 was released so I
didn't change the 7.4 code.

In 7.5, such locking/copying is gone, and if the function isn't
thread-safe, and there is no *_r function, we throw a configure error as
for threading.

FreeBSD 4.9 fails the getpwuid() test, and there is no getpwuid_r().
The documentation for getpwuid() is clear that it isn't thread-safe, so
I think the test is correct.

Basically, there is nothing we can do to fix this situation on FreeBSD
4.9 and probably other 4.X releases.

The good news is that the new configure tests for threading worked
perfectly and the system spit out a clear message explaining the
failure.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Browse pgsql-hackers by date

  From Date Subject
Next Message wespvp 2004-04-26 01:05:04 Re: thread_test.c problems
Previous Message Christopher Browne 2004-04-25 22:21:30 Re: Usability, MySQL, Postgresql.org, gborg, contrib, etc.