Re: HUGE Stack space is gettiing consumed

From: "Mavinakuli, Prasanna (STSD)" <prasanna(dot)b-m(at)hp(dot)com>
To: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: HUGE Stack space is gettiing consumed
Date: 2006-04-20 14:50:30
Message-ID: E84C4F56CA80174D8834825116CF247F027277E7@bgeexc05.asiapacific.cpqcorp.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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:kleptog(at)svana(dot)org]
Sent: Tuesday, April 18, 2006 2:46 PM
To: Mavinakuli, Prasanna (STSD)
Cc: pgsql-general(at)postgresql(dot)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(at)svana(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrus 2006-04-20 14:56:56 How to replace rows in table so that foreign key rows are not deleted
Previous Message Tom Lane 2006-04-20 14:28:41 Re: FW: code to cancel a running query, worker thread