pg_walinspect memory leaks

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема pg_walinspect memory leaks
Дата
Msg-id CAH2-WznLEJjn7ghmKOABOEZYuJvkTk=GKU3m0+-XBAH+erPiJQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: pg_walinspect memory leaks  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
It looks like pg_walinspect's GetWALRecordsInfo() routine doesn't take
sufficient care with memory management. It should avoid memory leaks
of the kind that lead to OOMs whenever
pg_get_wal_records_info_till_end_of_wal() has to return very many
tuples. Right now it isn't that hard to make that happen, even on a
system where memory is plentiful. I wasn't expecting that, because all
of these functions use a tuplestore.

More concretely, it looks like GetWALRecordInfo() calls
CStringGetTextDatum/cstring_to_text in a way that accumulates way too
much memory in ExprContext. This could be avoided by using a separate
memory context that is reset periodically, or something else along the
same lines.

-- 
Peter Geoghegan



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

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: recovery modules
Следующее
От: Jacob Champion
Дата:
Сообщение: [PATCH] Fix unbounded authentication exchanges during PQconnectPoll()