Re: Deadlock in libpq

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Erik Hesselink <hesselink(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: Deadlock in libpq
Date: 2011-03-24 16:57:14
Message-ID: AANLkTimnj8XOhC-FtDiXj8=7po03PRH5462kqbzY3JZZ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 24, 2011 at 11:52 AM, Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
>> As far as connections getting dropped: yes, this sounds reasonable,
>> but given that both the client and the server are running on the same
>> machine, will connections (to 127.0.0.1) really be dropped once every
>> 100.000 or so?
>
> No, don't bother, I forgot the default behavior was to do both, which
> is probably correct in your case. InitSSL just signals if you want
> them to be done.
>
> libpq refcounts connections and does SSL initialization when
> connection count goes from 0->1 and destruction when it goes from
> 1->0.  This operation is protected with mutex (you *are* using thread
> safe libpq, right?).

meh, you have to be -- the locking stuff only gets set up w/thread
safe libpq. It's basically impossible for that refcount to get thrown
off aiui. hm. I'm going back to thinking tom was right and this is
threading issue in the app...maybe there is something you haven't
considered?

merlin

merlin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2011-03-24 17:18:16 Re: which view is used another views
Previous Message Andrew Dunstan 2011-03-24 16:55:13 Re: foreign data wrappers