Re: Memory leaks using refcursors

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: Memory leaks using refcursors
Дата
Msg-id 283BFCEF-8CA2-4955-A64F-39E94F2882F3@fastcrypt.com
обсуждение исходный текст
Ответ на Re: Memory leaks using refcursors  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-jdbc
Tom,

The driver ends up issuing a 

fetch all in  <unnamed portal 1>

which if I try to close gives an error

cursor "<unnamed portal 1>" does not exist

so my guess is the portal is gone... what else might be keeping server memory ???

I thought about this and long running transactions and if this were really a problem slony would certainly blow up, as it has transactions that run days.

Dave
On 17-Jan-07, at 5:31 PM, Tom Lane wrote:

"Guillaume Smet" <guillaume.smet@gmail.com> writes:
Isn't there a way to keep the cursor name and close it automatically
when the statement or the resulting result set is closed?

While I agree that the driver probably should do that, I'm not sure why
you are having a problem.  A cursor doesn't normally accumulate its
result set in memory on the backend side, so I wouldn't have expected
all that big a memory leak.  What queries are you executing?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Guillaume Smet"
Дата:
Сообщение: Re: Memory leaks using refcursors
Следующее
От: Todd Shoemaker
Дата:
Сообщение: Default numeric scale of zero in JDBC?