pgsql: Fix small memory leak in partial-aggregate deserialization funct

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix small memory leak in partial-aggregate deserialization funct
Дата
Msg-id E1bG63F-0001Gj-50@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix small memory leak in partial-aggregate deserialization functions.

A deserialize function's result is short-lived data during partial
aggregation, since we're just going to pass it to the combine function
and then it's of no use anymore.  However, the built-in deserialize
functions allocated their results in the aggregate state context,
resulting in a query-lifespan memory leak.  It's probably not possible for
this to amount to anything much at present, since the number of leaked
results would only be the number of worker processes.  But it might become
a problem in future.  To fix, don't use the same convenience subroutine for
setting up results that the aggregate transition functions use.

David Rowley

Report: <10050.1466637736@sss.pgh.pa.us>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/bd1693e89e7e6c458d0563f6cc67a7c99a45251a

Modified Files
--------------
src/backend/utils/adt/numeric.c | 56 +++++++++++++++++++++++++++++++++--------
1 file changed, 45 insertions(+), 11 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Improve user-facing documentation for partial/parallel aggregati
Следующее
От: Andrew Dunstan
Дата:
Сообщение: pgsql: Add tab completion for pager_min_lines to psql.