Re: setFetchSize() [Viruschecked] [Viruschecked] - Mailing list pgsql-jdbc

From Dmitry Tkach
Subject Re: setFetchSize() [Viruschecked] [Viruschecked]
Date
Msg-id 3F16E3F5.5030902@openratings.com
Whole thread Raw
In response to Re: setFetchSize() [Viruschecked] [Viruschecked]  ("Patric Bechtel" <bechtel@ipcon.de>)
List pgsql-jdbc
Patric Bechtel wrote:

>That's exactly like I see it here (Windows AND Linux, Version 7.3.3).
>The setFetchSize-code was analyzed and party improved by me (my patch didn't get accepted, sigh) to be switched on and
offby an URL parameter. So I clearly understand what it does. And that's what I told you. 
>But: If I enter into psql and put one of the queries into it with a "declare test cursor for" infront of it, postgres
startsincreasing it's memory footprint, and it ends this only if I do a \c anotherDataBase. The same thing I
experiencedin my Java apps. I even had problems with the shared memory size, so I had to increase that to unreasonable
valuesbeyond 4096 (at least it's unreasonable for ME). The whole database is 300 MB on the harddisk, but some specific
queriesstart to hug over 1 GB of memory. That's what I don't understand. And if the query is executed without the
cursor,the memory footprint stays within 10 MB! 
>Maybe one of the hackers can explain this... The configuration is standard, only shared buffers is raised, otherwise
thequeries tend to break just too soon. 
>
>
I am using cursors in 7.2 (with and without java) all the time, and have
never ever seen it do anything like that...
Either there is something wrong with your query (e.g., executing a
function that leaks memory), or something just got broken in 7.3 having
to do with cursors.
This has nothing to do with jdbc the way you are describing it.

Perhaps, you should bring this up on the pgsql-general, and/or
pgsql-bugs lists - if you can come up with a simple test case to
reproduce the problem, I am sure, some of the developers there will be
willing and able to fix it.

Dima

>tia
>
>Patric
>
>PGP Public Key Fingerprint: 2636 F26E F523 7D62  4377 D206 7C68 06BB
>
>-----BEGIN PGP SIGNATURE-----
>Version: PGPsdk version 1.7.1 (C) 1997-1999 Network Associates, Inc. and its affiliated companies.
>
>iQA/AwUBPxbQLHxoBrvMu8qQEQInFACgqBYkm3rcLs2ipqAaEWOGHr8rT+0AoKLa
>z5e+m9aQf3pFXQRrMm9Agp1f
>=Z/D8
>-----END PGP SIGNATURE-----
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
>               http://www.postgresql.org/docs/faqs/FAQ.html
>
>



pgsql-jdbc by date:

Previous
From: "Patric Bechtel"
Date:
Subject: Re: setFetchSize() [Viruschecked]
Next
From: Dmitry Tkach
Date:
Subject: Re: setFetchSize() [Viruschecked]