Re: [HACKERS] libpq questions...when threads collide
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Don Baccus <dhogaza@pacifier.com>
Cc: pgsql-hackers@postgreSQL.org
Date: 1999-12-12T22:41:50Z
Lists: pgsql-hackers
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