Re: Psql or test application hangs when interface is down for the DB server - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Psql or test application hangs when interface is down for the DB server
Date
Msg-id 19245.1216133153@sss.pgh.pa.us
Whole thread Raw
In response to Psql or test application hangs when interface is down for the DB server  ("K, Niranjan (NSN - IN/Bangalore)" <niranjan.k@nsn.com>)
Responses Re: Psql or test application hangs when interface is down for the DB server
List pgsql-bugs
"K, Niranjan (NSN - IN/Bangalore)" <niranjan.k@nsn.com> writes:
> In the postgres database there is table 'COUNTER_TABLE' with column
> integer type 'COUNTER'. The test application attached in this mail, will
> start a transaction, gets the current value in the COUNTER, increments
> the value and updates the incremented value into the COUNTER column.
> This is being done in a loop. The program is started in a remote client
> and after few transactions, the interface between the client & the
> database server is brought down (example I used "ifconfig eth0 down" in
> the server). With this the test application hangs and does not return
> from the API of postgres (ex. 'PQexec').

If you waited long enough for the TCP connection to time out, it would
return (with an error, of course).  This behavior is not a bug, it is
the expected behavior of any program using a network connection.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "K, Niranjan (NSN - IN/Bangalore)"
Date:
Subject: Psql or test application hangs when interface is down for the DB server
Next
From: "James Dietrich"
Date:
Subject: full-text search doesn't fall back on sequential scan when it could