dbTalk Databases Forums  

[BUGS] Hang in PQgetResult

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] Hang in PQgetResult in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ivetta Starikova
 
Posts: n/a

Default [BUGS] Hang in PQgetResult - 02-20-2004 , 02:34 PM






Hello,
I have a problem with my program that inserts records into postgreSQL
database.
After continuously running for several days, it suddenly hangs. Attaching
with
gdb to a process gives the following stack trace. It seems like a few
people
reported this problem but I haven't seen anyone suggest a steady solution.
In this post http://archives.postgresql.org/pgsql...9/msg00062.php
it is suggested to call PQstatus(), before making PQexec(). So the idea is
to call PQstatus() and if it's not good to reconnect, right?
Please, help.
Thank you.

(gdb) where

#0 0x4013241e in select () from /lib/libc.so.6

#1 0x401cb980 in __DTOR_END__ () from /usr/idp/mgt-svr/lib/logActions/db.so

#2 0x401bf9e5 in pqWait (forRead=1, forWrite=0, conn=0x81f2318) at
fe-misc.c:782

#3 0x401bd9fd in PQgetResult (conn=0x81f2318) at fe-exec.c:1337

#4 0x401bdbe5 in PQexec (conn=0x81f2318,

query=0xbfffe298 "INSERT INTO my_table VALUES (2, 1, 'no', 'no', 'no',
'no',"...)

at fe-exec.c:1462

__________________________________________________ _______________
Get a FREE online computer virus scan from McAfee when you click here.
http://clinic.mcafee.com/clinic/ibuy...n.asp?cid=3963


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Hang in PQgetResult - 02-20-2004 , 05:37 PM






"Ivetta Starikova" <ivetta_s (AT) hotmail (DOT) com> writes:
Quote:
I have a problem with my program that inserts records into postgreSQL
database.
After continuously running for several days, it suddenly hangs.
Looks to me like it's waiting for the server process. Are you sure
there isn't some other operation blocking the INSERT (perhaps by
exclusively locking the table)? If you're not sure what the server
is doing, try getting a stack trace from it.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.