pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix memory leak on DSM slot exhaustion.
9+ messages / 3 participants
[nested] [flat]

* pgsql: Fix memory leak on DSM slot exhaustion.
@ 2020-02-01 02:33 Thomas Munro <tmunro@postgresql.org>
  2020-02-01 09:36 ` Re: pgsql: Fix memory leak on DSM slot exhaustion. Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 9+ messages in thread

From: Thomas Munro @ 2020-02-01 02:33 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/93745f1e019543fe7b742d0c5e971aad8d08fd56

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



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: pgsql: Fix memory leak on DSM slot exhaustion.
  2020-02-01 02:33 pgsql: Fix memory leak on DSM slot exhaustion. Thomas Munro <tmunro@postgresql.org>
@ 2020-02-01 09:36 ` Michael Paquier <michael@paquier.xyz>
  2020-02-01 10:03   ` Re: pgsql: Fix memory leak on DSM slot exhaustion. Thomas Munro <thomas.munro@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Michael Paquier @ 2020-02-01 09:36 UTC (permalink / raw)
  To: Thomas Munro <tmunro@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org

Hi Thomas,

On Sat, Feb 01, 2020 at 02:33:42AM +0000, Thomas Munro wrote:
> 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.

It seems to me that you have forgotten REL_11_STABLE in the set of
branches to fix.

Thanks,
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: pgsql: Fix memory leak on DSM slot exhaustion.
  2020-02-01 02:33 pgsql: Fix memory leak on DSM slot exhaustion. Thomas Munro <tmunro@postgresql.org>
  2020-02-01 09:36 ` Re: pgsql: Fix memory leak on DSM slot exhaustion. Michael Paquier <michael@paquier.xyz>
@ 2020-02-01 10:03   ` Thomas Munro <thomas.munro@gmail.com>
  0 siblings, 0 replies; 9+ messages in thread

From: Thomas Munro @ 2020-02-01 10:03 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Thomas Munro <tmunro@postgresql.org>; pgsql-committers <pgsql-committers@lists.postgresql.org>

On Sat, Feb 1, 2020 at 10:37 PM Michael Paquier <michael@paquier.xyz> wrote:
> It seems to me that you have forgotten REL_11_STABLE in the set of
> branches to fix.

Thanks for catching that.  Pushed.





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* pgsql: Fix memory leak on DSM slot exhaustion.
@ 2020-02-01 02:34 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 9+ messages in thread

From: Thomas Munro @ 2020-02-01 02:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/24dd34af1435a2a97e8b67d82328e45d0ac51413

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



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* pgsql: Fix memory leak on DSM slot exhaustion.
@ 2020-02-01 02:34 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 9+ messages in thread

From: Thomas Munro @ 2020-02-01 02:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* pgsql: Fix memory leak on DSM slot exhaustion.
@ 2020-02-01 02:35 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 9+ messages in thread

From: Thomas Munro @ 2020-02-01 02:35 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/93be45245272fc9f59caecc3db949b49b464a2a1

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



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* pgsql: Fix memory leak on DSM slot exhaustion.
@ 2020-02-01 02:35 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 9+ messages in thread

From: Thomas Munro @ 2020-02-01 02:35 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* pgsql: Fix memory leak on DSM slot exhaustion.
@ 2020-02-01 02:36 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 9+ messages in thread

From: Thomas Munro @ 2020-02-01 02:36 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/95936c795b9f086c2b413b5150d2993ac30354fa

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



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* pgsql: Fix memory leak on DSM slot exhaustion.
@ 2020-02-01 10:01 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 9+ messages in thread

From: Thomas Munro @ 2020-02-01 10:01 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/600387f5dd286d6ca72a578b09ef3765f45d95e6

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



^ permalink  raw  reply  [nested|flat] 9+ messages in thread


end of thread, other threads:[~2020-02-01 10:03 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-01 02:33 pgsql: Fix memory leak on DSM slot exhaustion. Thomas Munro <tmunro@postgresql.org>
2020-02-01 09:36 ` Michael Paquier <michael@paquier.xyz>
2020-02-01 10:03   ` Thomas Munro <thomas.munro@gmail.com>
2020-02-01 02:34 pgsql: Fix memory leak on DSM slot exhaustion. Thomas Munro <tmunro@postgresql.org>
2020-02-01 02:34 pgsql: Fix memory leak on DSM slot exhaustion. Thomas Munro <tmunro@postgresql.org>
2020-02-01 02:35 pgsql: Fix memory leak on DSM slot exhaustion. Thomas Munro <tmunro@postgresql.org>
2020-02-01 02:35 pgsql: Fix memory leak on DSM slot exhaustion. Thomas Munro <tmunro@postgresql.org>
2020-02-01 02:36 pgsql: Fix memory leak on DSM slot exhaustion. Thomas Munro <tmunro@postgresql.org>
2020-02-01 10:01 pgsql: Fix memory leak on DSM slot exhaustion. Thomas Munro <tmunro@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox