From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | ecolgan(at)shiftwatch(dot)com |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Timeout Value on network error |
Date: | 2006-11-05 02:04:39 |
Message-ID: | 20061105020439.GA10274@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Oct 30, 2006 at 11:46:01AM -0800, ecolgan(at)shiftwatch(dot)com wrote:
> We're using a remote Postgres server to view video data. It works
> well, but we're having a hard time making our app robust when the
> network fails. For example, PQexec does not return consistently when
> the cable is disconnected.
Network connections use TCP, which was designed to be robust over
unreliable networks. A TCP connection isn't supposed to fail right
away in the face of network problems like disconnected cables;
instead, TCP retransmits packets with the hope that connectivity
will soon be re-established.
> Is there a timeout value that we can configure, so all PQ* functions
> return consistently?
You could use asynchronous command processing with poll() or select().
http://www.postgresql.org/docs/8.1/interactive/libpq-async.html
--
Michael Fuhr
From | Date | Subject | |
---|---|---|---|
Next Message | Russell Smith | 2006-11-05 03:14:01 | ERROR: tuple concurrently updated |
Previous Message | Michael Glaesemann | 2006-11-05 02:03:46 | Re: How to get joins to work |