Re: libpq thread safety - Mailing list pgsql-hackers

From Tom Lane
Subject Re: libpq thread safety
Date
Msg-id 16946.1073841151@sss.pgh.pa.us
Whole thread Raw
In response to Re: libpq thread safety  (Manfred Spraul <manfred@colorfullife.com>)
Responses Re: libpq thread safety
List pgsql-hackers
Manfred Spraul <manfred@colorfullife.com> writes:
> Tom Lane wrote:
>> Wouldn't help anyway, if some other part of the app also calls kerberos.
>> 
> That's why I've proposed to use the system from openssl: The libpq user 
> must implement a lock callback, and libpq calls it around the critical 
> sections.

... and if the rest of the app doesn't all adopt the same rule, you're
still screwed.  Not a big step forward.

I'd also expect that anytime someone gets their callback wrong, we will
get the bug report.  I don't think that a system in which people "must"
implement their own locking primitives is desirable.

> Attached is an untested prototype patch. What do you think?

Personally I find diff -u format completely unreadable :-(.  Send
"diff -c" if you want useful commentary.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Manfred Spraul
Date:
Subject: Re: libpq thread safety
Next
From: Tom Lane
Date:
Subject: Re: psql \d option list overloaded