Question about MemoryContexts and functions that returns sets.

Поиск
Список
Период
Сортировка
От Thomas Hallgren
Тема Question about MemoryContexts and functions that returns sets.
Дата
Msg-id 441E884D.7010707@tada.se
обсуждение исходный текст
Ответы Re: Question about MemoryContexts and functions that returns sets.  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
Hi,
A PL/Java user reports that his backend runs out of memory when he uses 
PL/Java to execute huge queries towards a remote database and return the 
result. PL/Java is designed not to collect data in memory when it 
returns result sets. Each call to the function handler will be 
dispatched to the corresponding 'ResultSet.next()' in order to retrieve 
and propagate one row at a time. Yet, it seems the data is collected 
somewhere. An excerpt from the user at the time he runs out of memory 
looks like this:

SPI Proc: 273670144 total in 67 blocks; 3840 free (29 chunks); 273666304 used
...
ExecutorState: 1141402016 total in 204 blocks; 7923848 free (3633 chunks); 1133478168 used
...


so obviously, I'm doing something wrong in my code. Any advice what I 
should be looking for?

Kind Regards,
Thomas Hallgren



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

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: [pgsql-advocacy] PostgreSQL Anniversary Proposals --Important Update
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Question about MemoryContexts and functions that returns sets.