Re: [HACKERS] libpq questions...when threads collide

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Don Baccus <dhogaza(at)pacifier(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] libpq questions...when threads collide
Date: 1999-12-12 22:41:50
Message-ID: 4555.945038510@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Don Baccus <dhogaza(at)pacifier(dot)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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1999-12-12 22:46:51 Re: [HACKERS] 6.6 release
Previous Message Don Baccus 1999-12-12 22:18:47 libpq questions...when threads collide