Re: setFetchSize() [Viruschecked] [Viruschecked]

From: Dmitry Tkach <dmitry(at)openratings(dot)com>
To: Patric Bechtel <bechtel(at)ipcon(dot)de>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: setFetchSize() [Viruschecked] [Viruschecked]
Date: 2003-07-17 17:59:17
Message-ID: 3F16E3F5.5030902@openratings.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 off by 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 starts increasing it's memory footprint, and it ends this only if I do a \c anotherDataBase. The same thing I experienced in my Java apps. I even had problems with the shared memory size, so I had to increase that to unreasonable values beyond 4096 (at least it's unreasonable for ME). The whole database is 300 MB on the harddisk, but some specific queries start 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 the queries 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
>
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dmitry Tkach 2003-07-17 18:01:16 Re: setFetchSize() [Viruschecked]
Previous Message Patric Bechtel 2003-07-17 17:56:05 Re: setFetchSize() [Viruschecked]