Hello Martijin, I am not able to make it ..Code what u sent is *not* giving desired result.. That is -when we try to fetch huge data in a thread routine it says "could not receive data from server: Error 0" If it was in main thread then it goes thorugh..I.e It's able to get the huge data.
Environment.. Postgres Version:7.4.3 Compiler:aCC 5.0 OS:HP-UX PARISC 11.23 Code has put in the following link.. http://phpfi.com/113850 Will send the tusc output (stack trace) Thx, Prasanna. -----Original Message----- From: Martijn van Oosterhout [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 18, 2006 2:46 PM To: Mavinakuli, Prasanna (STSD) Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] HUGE Stack space is gettiing consumed On Tue, Apr 18, 2006 at 12:31:57PM +0530, Mavinakuli, Prasanna (STSD) wrote: > Hello Martijin, > Thx for u'r Suggetions.. > > Here is Complete source code.. Ok, I can't get it to fail. I cleaned up the code because it wouldn't compile as is (g++ 3.3.5 on Debian). I've put the cleaned up version here: http://svana.org/kleptog/temp/test.cpp You might need to change the QUERY_STRING and the CONNECT_STRING back. Could you try running this to see if you can get it to fail? If it's does fail, could you post the output of: strace -f <program> somewhere (*don't* post it to the list). Somewhere like: http://phpfi.com/ should work well. > Desc about following code:::: > > Code has a function named as queryDB, which makes a connection to our > DB and then tries to query Particular table which has huge string in > it's field. > > If this method called from main thread then it *DOES* work properly. > > But if we make that as routine function for a thread it doesn't work > instead we will get that following status ::: > ( PGRES_FATAL_ERROR ) > ***could not receive data from server: Invalid argument*** Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is > a tool for doing 5% of the work and then sitting around waiting for > someone else to do the other 95% so you can sue them. ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq