From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: malcolm.macleod@tshwanedje.com, "pgsql-odbc@postgresql.org" <pgsql-odbc@postgresql.org>
To: Itnal, Prakash (NSN - IN/Bangalore) <prakash.itnal@nsn.com>
Subject: Re: Issue with retry_count in socket.c and fix for the same
Date: Tue, 27 May 2014 17:34:33 +0300
Message-ID: <5384A279.3090709@vmware.com> (raw)
In-Reply-To: <1401122546.14277.8.camel@watchmen.homenetwork>
References: <6C8E163ED7EF5846B2F44CDBC63300112E6BAB@SGSIMBX002.nsn-intra.net>
<5374A411.4090907@vmware.com>
<1401122546.14277.8.camel@watchmen.homenetwork>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>
On 05/26/2014 07:42 PM, Malcolm MacLeod wrote:
> Just wanted to confirm that I have tracked this down as the cause for a
> freeze/crash in our software as well.
> I can get it to block forever on the select call just by
> disconnecting/reconnecting network on a client a few times while it is
> querying lots of data from the server.
> I've tested the original patch and it does fix the issue, would be great
> to see a final fix for this.
Hmm, the driver enables TCP keepalives by default, which should
eventually notice a broken connection. It can take a long time, though;
I believe the default on most systems is two hours. Unfortunately there
are no options in psqlODBC to change the defaults, but e.g. on Linux you
can change the system-wide default with the tcp_keepalive_time sysctl.
I think the missing feature here is to add psqlODBC configuration
variables similar to libpq's keepalives_idle, keepalives_interval and
keepalives_count. I'm not going to work on that myself, but patches are
welcome.
- Heikki
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: hlinnakangas@vmware.com, prakash.itnal@nsn.com
Subject: Re: Issue with retry_count in socket.c and fix for the same
In-Reply-To: <5384A279.3090709@vmware.com>
References: <6C8E163ED7EF5846B2F44CDBC63300112E6BAB@SGSIMBX002.nsn-intra.net> <5374A411.4090907@vmware.com> <1401122546.14277.8.camel@watchmen.homenetwork> <5384A279.3090709@vmware.com>
* 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