pgsql: Fix intra-query memory leak when a SRF returns zero rows.
В списке pgsql-committers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | pgsql: Fix intra-query memory leak when a SRF returns zero rows. |
| Дата | |
| Msg-id | E1qwngS-002nnH-4y@gemulon.postgresql.org обсуждение |
| Список | pgsql-committers |
Fix intra-query memory leak when a SRF returns zero rows. When looping around after finding that the set-returning function returned zero rows for the current input tuple, ExecProjectSet neglected to reset either of the two memory contexts it's responsible for cleaning out. Typically this wouldn't cause much problem, because once the SRF does return at least one row, the contexts would get reset on the next call. However, if the SRF returns no rows for many input tuples in succession, quite a lot of memory could be transiently consumed. To fix, make sure we reset both contexts while looping around. Per bug #18172 from Sergei Kornilov. Back-patch to all supported branches. Discussion: https://postgr.es/m/18172-9b8c5fc1d676ded3@postgresql.org Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/07494a0df9a66219e5f1029de47ecabc34c9cb55 Modified Files -------------- src/backend/executor/nodeProjectSet.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера