On Wed, 8 Feb 2006, Tom Lane wrote: > "Andy Klosterman" <[EMAIL PROTECTED]> writes: > > SPECULATION: Another possibility is that I misunderstand some aspect of > > multi-threaded interactions with Postgres (I open uniquely named connections > > to the DB for each thread of my test program). Maybe I need to have a > > "lock" around the code that makes DB connections and make sure that only one > > happens at a time (might be better handled within Postgres/SSL if that is > > the case). > > There could be some re-entrancy problem in the SSL connection startup > code --- if you add such a lock, does it get more reliable? Also, did > you remember to build PG with --enable-thread-safety ? > > regards, tom lane
(I'm back after a bit of an illness. Much better now!) I threw in a pthread mutex around the code making the database connections for each of my threads. The problem is still there ("corrupted double-linked list"). Even tuning things down and instructing my code to only run a single pthread manifests the problem over an SSL connection. Everything is just fine without SSL. Other code I've written works just fine with (and without) threads connecting to the database with (and without) SSL. Tracking down exactly what's tickling the problem in this case could be tricky... I'm using the pre-built debian testing packages, not self-compiled code, for my postgres installation. From the information I can gather from the debian build logs (http://buildd.debian.org/build.php), everything was configured and built with threads enabled. --Andrew J. Klosterman [EMAIL PROTECTED] ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend