Don Baccus <dhogaza@pacifier.com> writes:
> Despite the thread unsafeness
> of PQsetdb et al, I've never seen a failure in this environment
> and I've never heard of folks experiencing such a failure.
The *only* thing that's actually thread-unsafe, AFAIR, is
PQconnectdb's use of a global array for connection parameters.
PQsetdb/setdbLogin are thread-safe; so just use them instead.
At least that was true before the async-connection code got added.
I haven't looked at that to see if it introduces any problems.
regards, tom lane