Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > Problem with Po...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 3165 of 3323
Post > Topic >>

Problem with Postgres 8.1.4

by Selvakaruppiahs@[EMAIL PROTECTED] ("Selvakaruppiah s-TLS,Chennai") Aug 11, 2008 at 10:55 AM

This is a multi-part message in MIME format.

------_=_NextPart_001_01C8FB72.B9CCA5B9
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable


Hi All

=20

I am facing a problem with Postgres 8=2E1=2E4 Windows native version=2E

I am writing a simple application that executes an update query in a
postgres database=2E

This query execution will be called in a loop for 500 times=2E

After starting the execution of the exe, I am switching off the Postgres
server machine (say abrupt shutdown of the machine happened)=2E

In this scenario, my sample application hangs=2E

=20

Application code snippet would be like the below=2E

=20

DBObj=2EOpen (NULL, FALSE, FALSE, ConnectionString);

SQL =3D "Update mytable set sno=3D1 where sno=3D1";

for(int n=3D0; n<500; n++)

{

Try

{

WriteLog("Start");

DBObj=2EExecuteSQL (strSql);

WriteLog("End");

}

Catch Exceptions=2E=2E=2E{}

}

=20

=20

Application hangs in the ExecuteSql statement itself=2E

=20

This problem is not happening with Postgres 7=2E2=2E4 that runs on top of
Cygwin=2E

And also this problem is not happening if I shutdown the server alone
from Services

Instead of machine shutdown=2E

=20

Any help is appreciated=2E

Thanks in advance=2E

=20

Regards,

Selva

=20



DISCLAIMER:
---------------------------------------------------------------------------=
--------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and=
 intended for the named recipient(s) only=2E
It shall not attach any liability on the originator or HCL or its=
 affiliates=2E Any views or opinions presented in=20
this email are solely those of the author and may not necessarily reflect=
 the opinions of HCL or its affiliates=2E
Any form of reproduction, dissemination, copying, disclosure,
modification,=
 distribution and / or publication of=20
this message without the prior written consent of the author of this
e-mail=
 is strictly prohibited=2E If you have=20
received this email in error please delete it and notify the sender=
 immediately=2E Before opening any mail and=20
attachments please check them for viruses and defect=2E

---------------------------------------------------------------------------=
--------------------------------------------
------_=_NextPart_001_01C8FB72.B9CCA5B9
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=
=3D"urn:schemas-microsoft-com:office:office" xmlns:w=
=3D"urn:schemas-microsoft-com:office:word" xmlns=3D"http://www=2Ew3=
=2Eorg/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @[EMAIL PROTECTED]
"MS Mincho";
	panose-1:2 2 6 9 4 2 5 8 3 4;}
@[EMAIL PROTECTED]
"MS Gothic";
	panose-1:2 11 6 9 7 2 5 8 2 4;}
@[EMAIL PROTECTED]
 4 6 4 5 5 5 2 3 4;}
@[EMAIL PROTECTED]
"MS Gothic";
	panose-1:2 11 6 9 7 2 5 8 2 4;}
@[EMAIL PROTECTED]
"MS Mincho";
	panose-1:2 2 6 9 4 2 5 8 3 4;}
 /* Style Definitions */
 p=2EMsoNormal, li=2EMsoNormal, div=2EMsoNormal
	{margin:0mm;
	margin-bottom:=2E0001pt;
	font-size:12=2E0pt;
	font-family:"Times New Roman";}
a:link, span=2EMsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span=2EMsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span=2EEmailStyle17
	{mso-style-type:personal;
	font-family:Arial;
	color:navy;}
span=2EEmailStyle18
	{mso-style-type:personal-reply;
	font-family:Arial;
	color:navy;}
@[EMAIL PROTECTED]
 Section1
	{size:595=2E3pt 841=2E9pt;
	margin:99=2E25pt 30=2E0mm 30=2E0mm 30=2E0mm;}
div=2ESection1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026">
  <v:textbox inset=3D"5=2E85pt,=2E7pt,5=2E85pt,=2E7pt" />
 </o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=3Dwhite lang=3DJA link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<div>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=2E0pt;font-family:Arial;color:navy'>Hi=
 All<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=
=2E0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=2E0pt;font-family:Arial;color:navy'>I am facing a=
 problem with
Postgres 8=2E1=2E4 Windows native version=2E<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=2E0pt;font-family:Arial;color:navy'>I am writing a=
 simple application
that executes an update query in a postgres database=
=2E<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=2E0pt;font-family:Arial;color:navy'>This query=
 execution will
be called in a loop for 500 times=2E<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=2E0pt;font-family:Arial;color:navy'>After starting=
 the execution
of the exe, I am switching off the Postgres server machine (say abrupt=
 shutdown
of the machine happened)=2E<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=2E0pt;font-family:Arial;color:navy'>In this
scenario,=
 my sample
application hangs=2E<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=
=2E0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=2E0pt;font-family:Arial;color:navy'>Application
code=
 snippet would
be like the below=2E<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=
=2E0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=2E0pt;font-family:Arial;color:navy'>DBObj=2EOpen=
 (NULL, FALSE,
FALSE, ConnectionString);<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=2E0pt;font-family:Arial;color:navy'>SQL =3D=
 &quot;Update mytable
set sno=3D1 where sno=3D1&quot;;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=2E0pt;font-family:Arial;color:navy'>for(int n=3D0;=
 n&lt;500; n++)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=
=2E0pt;font-family:Arial;color:navy'>{<o:p></o:p></span></font></p>

<p class=3DMsoNormal style=3D'text-indent:42=2E0pt'><font size=3D2 color=
=3Dnavy
face=3DArial><span lang=3DEN-US style=3D'font-size:10=
=2E0pt;font-family:Arial;
color:navy'>Try<o:p></o:p></span></font></p>

<p class=3DMsoNormal style=3D'text-indent:42=2E0pt'><font size=3D2 color=
=3Dnavy
face=3DArial><span lang=3DEN-US style=3D'font-size:10=
=2E0pt;font-family:Arial;
color:navy'>{<o:p></o:p></span></font></p>

<p class=3DMsoNormal style=3D'margin-left:42=2E0pt;text-indent:42=
=2E0pt'><font size=3D2
color=3Dnavy face=3DArial><span lang=3DEN-US style=3D'font-size:10=
=2E0pt;font-family:
Arial;color:navy'>WriteLog(&#8220;Start&#8221;);<o:p></o:p></span></font></=
p>

<p class=3DMsoNormal style=3D'margin-left:42=2E0pt;text-indent:42=
=2E0pt'><font size=3D2
color=3Dnavy face=3DArial><span lang=3DEN-US style=3D'font-size:10=
=2E0pt;font-family:
Arial;color:navy'>DBObj=2EExecuteSQL
(strSql);<o:p></o:p></span></font></p>

<p class=3DMsoNormal style=3D'margin-left:42=2E0pt;text-indent:42=
=2E0pt'><font size=3D2
color=3Dnavy face=3DArial><span lang=3DEN-US style=3D'font-size:10=
=2E0pt;font-family:
Arial;color:navy'>WriteLog(&#8220;End&#8221;);<o:p></o:p></span></font></p>

<p class=3DMsoNormal style=3D'text-indent:42=2E0pt'><font size=3D2 color=
=3Dnavy
face=3DArial><span lang=3DEN-US style=3D'font-size:10=
=2E0pt;font-family:Arial;
color:navy'>}<o:p></o:p></span></font></p>

<p class=3DMsoNormal style=3D'text-indent:42=2E0pt'><font size=3D2 color=
=3Dnavy
face=3DArial><span lang=3DEN-US style=3D'font-size:10=
=2E0pt;font-family:Arial;
color:navy'>Catch Exceptions&#8230;{}<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=
=2E0pt;font-family:Arial;color:navy'>}<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=
=2E0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=
=2E0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=2E0pt;font-family:Arial;color:navy'>Application
hangs=
 in the ExecuteSql
statement itself=2E<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=
=2E0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=2E0pt;font-family:Arial;color:navy'>This problem is=
 not happening
with Postgres 7=2E2=2E4 that runs on top of Cygwin=
=2E<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=2E0pt;font-family:Arial;color:navy'>And also this=
 problem is not
happening if I shutdown the server alone from=
 Services<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=2E0pt;font-family:Arial;color:navy'>Instead of=
 machine shutdown=2E<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=
=2E0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=2E0pt;font-family:Arial;color:navy'>Any help is=
 appreciated=2E<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=2E0pt;font-family:Arial;color:navy'>Thanks in
advance=
=2E<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=
=2E0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=
=2E0pt;font-family:Arial;color:navy'>Regards,<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=
=2E0pt;font-family:Arial;color:navy'>Selva<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span lang=
=3DEN-US
style=3D'font-size:10=
=2E0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

</div>

</div>

</body>

</html>

<table><tr><td bgcolor=3D#ffffff><font color=3D#000000>DISCLAIMER:<br>
---------------------------------------------------------------------------=
--------------------------------------------<br>
<br>
The contents of this e-mail and any attachment(s) are confidential and=
 intended for the named recipient(s) only=2E<br>
It shall not attach any liability on the originator or HCL or its=
 affiliates=2E Any views or opinions presented in <br>
this email are solely those of the author and may not necessarily reflect=
 the opinions of HCL or its affiliates=2E<br>
Any form of reproduction, dissemination, copying, disclosure,
modification,=
 distribution and / or publication of <br>
this message without the prior written consent of the author of this
e-mail=
 is strictly prohibited=2E If you have <br>
received this email in error please delete it and notify the sender=
 immediately=2E Before opening any mail and <br>
attachments please check them for viruses and defect=2E<br>
<br>
---------------------------------------------------------------------------=
--------------------------------------------<br>
</font></td></tr></table>
------_=_NextPart_001_01C8FB72.B9CCA5B9--
 




 3 Posts in Topic:
For Perl users - hope it helps somebody
fleovey@[EMAIL PROTECTED]  2008-07-10 10:54:27 
SetQueryTimeout in Postgres 8.1.4
Selvakaruppiahs@[EMAIL PR  2008-08-05 08:24:00 
Problem with Postgres 8.1.4
Selvakaruppiahs@[EMAIL PR  2008-08-11 10:55:59 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 5:55:08 CST 2008.