On Mon, Oct 30, 2006 at 11:46:01AM -0800, [EMAIL PROTECTED] 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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/

Reply via email to