When I try to run thread_test.c from the CVS tip, it hangs in an infinite CPU loop on both linux (RedHat AS 3.0, gcc 3.2.3) and Mac OS X 10.3.3 (gcc 3.3). I've also tried down to gcc 2.96 on Mac OS X. If I compile it with -g instead of -O2 on linux, it runs to completion and gives me: Add this to your template/$port file: STRERROR_THREADSAFE=yes GETPWUID_THREADSAFE=no GETHOSTBYNAME_THREADSAFE=no On Mac OS X, it gives me: Add this to your template/$port file: STRERROR_THREADSAFE=yes GETPWUID_THREADSAFE=yes GETHOSTBYNAME_THREADSAFE=yes If I modify the two while loops while (errno2_set == 0) while (errno1_set == 0) To execute a 'print' statement or a 'time(NULL)' instead of a null loop, then it runs to completion with -O2. If I run the 7.4.2 version of thread_test.c, for both platforms I get: Add this to your template/$port file: NEED_REENTRANT_FUNCS=yes On linux, the make run is: ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match