Re: Postgres connection errors

From: Tim Uckun <timuckun(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgres connection errors
Date: 2010-11-02 23:25:09
Message-ID: AANLkTimB0HN022VgxRPTSOrjF402q1MLs8wdZa4txjD7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> Most of the cases we've seen like that have been because multiple
> threads in the client application were trying to use the same PGconn
> connection object concurrently.  There's no cross-thread synchronization
> built into libpq, so you have to provide the interlocks yourself if
> there's any possibility of multiple threads touching the same PGconn
> concurrently.  And it will not support more than one query at a time
> in any case.

These are not threaded daemons but this does give me some sort of a
clue to work on. I noticed that there is a call to clear stale
connections which might be the culprit because in the case of these
workers there is only one connection.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jonathan Tripathy 2010-11-02 23:29:00 Re: JDBC Transactions
Previous Message Craig Ringer 2010-11-02 23:16:21 Re: Replication