Hi All
I am facing a problem with Postgres 8.1.4 Windows native version.
I am writing a simple application that executes an update query in a postgres database.
This query execution will be called in a loop for 500 times.
After starting the execution of the exe, I am switching off the Postgres server machine (say abrupt shutdown of the machine happened).
In this scenario, my sample application hangs.
Application code snippet would be like the below.
DBObj.Open (NULL, FALSE, FALSE, ConnectionString);
SQL = "Update mytable set sno=1 where sno=1";
for(int n=0; n<500; n++)
{
Try
{
WriteLog(“Start”);
DBObj.ExecuteSQL (strSql);
WriteLog(“End”);
}
Catch Exceptions…{}
}
Application hangs in the ExecuteSql statement itself.
This problem is not happening with Postgres 7.2.4 that runs on top of Cygwin.
And also this problem is not happening if I shutdown the server alone from Services
Instead of machine shutdown.
Any help is appreciated.
Thanks in advance.
Regards,
Selva