From: Tom Lane <tgl@sss.pgh.pa.us>
To: Forest Wilkinson <lyris-pg@tibit.com>
Cc: pgsql-interfaces@postgresql.org
Cc: dfs@roaringpenguin.com
Subject: Re: Weird behaviour on Solaris: recv() returns ENOENT
Date: Thu, 26 Jun 2003 23:57:54 -0400
Message-ID: <24602.1056686274@sss.pgh.pa.us> (raw)
In-Reply-To: <bv4nfv0ohs0huc08vkl2g9hgt8edlsk6j9@4ax.com>
References: <bv4nfv0ohs0huc08vkl2g9hgt8edlsk6j9@4ax.com>
Forest Wilkinson <lyris-pg@tibit.com> writes:
> I'm having a similar problem, but instead of ENOENT I'm getting what
> appears to be ECONNREFUSED. (PQresultStatus() says "Connection
> refused".) This is on a Solaris 9 box, with Postgres 7.3.2 and 7.3.3,
> using libpq in a multithreaded program. At the same time, postgres
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
libpq is not as thread-safe as the documentation alleges :-(. The
library itself doesn't do anything un-thread-safe, but it calls several
libc routines that are not thread-safe on many platforms. We are trying
to fix this for 7.4.
I am not certain that this is the explanation for your problems though.
IIRC, most of the known gotchas occur during connection startup, and
would not explain a failure in a running connection.
Are you both honoring the restriction that two threads can't
concurrently do operations on the same PGconn object? We provide
no locking that would make that safe, but consider it the application's
responsibility to do so if needed. I strongly suspect that David's
problem is of this ilk, less sure about Forest's.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, lyris-pg@tibit.com, dfs@roaringpenguin.com
Subject: Re: Weird behaviour on Solaris: recv() returns ENOENT
In-Reply-To: <24602.1056686274@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox