Forum OpenACS Q&A: Re: OpenACS/.LRN on Apple's OS X Panther

Collapse
Posted by Andrew Piskorski on
I'm no Postgres expert but AFAIK, you should not be building PostgreSQL with any special --enable-thread-safety switches, unless you're doing it for some bizarre Mac OS-X specific reason. PostgreSQL's thread safety options have nothing at all to do with connecting to PostgreSQL from AOLserver, and never did.
Collapse
Posted by russell muetzelfeldt on
--enable-thread-safety is new in PG 7.4, and is described in the release notes like this -
libpq and ECPG applications are now fully thread-safe
While previous libpq releases already supported threads, this release improves thread safety by fixing some non-thread-safe code that was used during database connection startup. The configure option --enable-thread-safety must be used to enable this feature.
and the install guide -
--enable-thread-safety
Make the client libraries thread-safe. This allows concurrent threads in libpq and ECPG programs to safely control their private connection handles.
Since nspostgres gets it's Postgres-ness from libpq, there is a potential issue if libpq is not thread safe and 2 threads silmultaneously try to open connections to the database. I don't know in detail how nspostgres handles recycling database connections, and given that database connections are long-lived in AOLserver it's probably pretty hard to trigger any lossage through this if it's even possible at all, but still...