From: | Thomas Munro <tmunro(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix memory leak on DSM slot exhaustion. |
Date: | 2020-02-01 02:35:38 |
Message-ID: | E1ixidG-00039G-LZ@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
------
REL9_5_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/a5f45c3dd3b569de07e9adf049e748c6a3a896a5
Modified Files
--------------
src/backend/storage/ipc/dsm.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2020-02-01 02:36:09 | pgsql: Fix memory leak on DSM slot exhaustion. |
Previous Message | Thomas Munro | 2020-02-01 02:35:15 | pgsql: Fix memory leak on DSM slot exhaustion. |