pgsql: Fix memory leak on DSM slot exhaustion.

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема pgsql: Fix memory leak on DSM slot exhaustion.
Дата
Msg-id E1ixicZ-00037N-T1@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix memory leak on DSM slot exhaustion.

If we attempt to create a DSM segment when no slots are available,
we should return the memory to the operating system.  Previously
we did that if the DSM_CREATE_NULL_IF_MAXSEGMENTS flag was
passed in, but we didn't do it if an error was raised.  Repair.

Back-patch to 9.4, where DSM segments arrived.

Author: Thomas Munro
Reviewed-by: Robert Haas
Reported-by: Julian Backes
Discussion: https://postgr.es/m/CA%2BhUKGKAAoEw-R4om0d2YM4eqT1eGEi6%3DQot-3ceDR-SLiWVDw%40mail.gmail.com

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/aab30cd4eddaa7e2b028a009d3ee11be42ce6f1e

Modified Files
--------------
src/backend/storage/ipc/dsm.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)


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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: pgsql: Fix memory leak on DSM slot exhaustion.
Следующее
От: Thomas Munro
Дата:
Сообщение: pgsql: Fix memory leak on DSM slot exhaustion.