The following bug has been logged online:
Bug reference: 1270
Logged by: Peter Davie
Email address: Peter.Davie@relevance.com.au
PostgreSQL version: 7.4.5
Operating system: OSF/1 4.0f
Description: stack overflow in thread in fe_getauthname
Details:
With the THREAD_SAFETY changes, a buffer is defined on the stack as:
char pwdbuf[BUFSIZ];
This buffer overflows the stack when used in a thread. As the application
creating the thread cannot be modified to increase the stack size, it would
probably be prudent to reduce this buffer size (I believe that BUFSIZ is
around 8192 bytes on most modern Unix implementations).
To rectify this issue (seg faults attempting to connect to the database), I
replaced the above declaration with:
char pwdbuf[1024];
Obviously, a manifest constant would be better!