| От | Andres Freund |
|---|---|
| Тема | Re: BUG #12910: Memory leak with logical decoding |
| Дата | |
| Msg-id | 20150409173455.GE9764@awork2.anarazel.de обсуждение исходный текст |
| Ответ на | Re: BUG #12910: Memory leak with logical decoding (Peter Slavov <pet.slavov@gmail.com>) |
| Ответы |
Re: BUG #12910: Memory leak with logical decoding
Re: BUG #12910: Memory leak with logical decoding |
| Список | pgsql-bugs |
Hi,
On 2015-04-09 18:11:27 +0300, Peter Slavov wrote:
> I prepared a test case, that can reproduce the problem.
Yup. I can reproduce it... I did not (yet) have the time to run the test
to completion, but i believe the attached patch should fix the problem
(and also improve performance a bit...).
Using the SQL interface for such large transactions isn't going to be
fun as all of the data, due to the nature of the set returning function
implementation in postgres, will be additionally written into a
tuplestore. The streaming interface doesn't have that behaviour.
Additionally it's probably not a good idea to stream such a large
resultset via SELECT using psql - IIRC it'll try to store all that data
in memory :). Try something like
\copy (select * from pg_logical_slot_peek_changes('testing', null, 1)) TO /tmp/f
or such.
Greetings,
Andres Freund
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера