Psql or test application hangs when interface is down for the DB server

From: "K, Niranjan (NSN - IN/Bangalore)" <niranjan(dot)k(at)nsn(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Psql or test application hangs when interface is down for the DB server
Date: 2008-07-15 13:54:51
Message-ID: 39C6C93FC1236641B94D3648B96E3BE70178E087@inbhexc001.nsn-intra.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

Environment used:
Postgres 8.3.1
psqlODBC 08.03.0200

Testcase:
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').

<<pg_test_app.cpp>>
In another example, run the psql from the remote client and connect to
the database server. Execute the SQL to update the COUNTER_TABLE. After
successful execution, next bring the network interface down on the
database server (Ex. I use the command "ifconfig eth0 down") and next
execute the SQL command to update the COUNTER_TABLE again from the same
remote client and the same DB session. The SQL command hangs.

regards,
Niranjan

Attachment Content-Type Size
pg_test_app.cpp application/octet-stream 2.2 KB

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2008-07-15 14:14:59 Re: BUG #4296: Server crashes by restoring database
Previous Message Michał Szeląg 2008-07-15 07:43:35 Re: BUG #4296: Server crashes by restoring database