Re: BUG #16160: Minor memory leak in case of starting postgres server with SSL encryption
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Stephen Frost <sfrost@snowman.net>, Jelte Fennema <postgres@jeltef.nl>,
Michael Paquier <michael@paquier.xyz>, duspensky@ya.ru,
pgsql-bugs@lists.postgresql.org
Date: 2021-03-20T16:50:27Z
Lists: pgsql-bugs
Andres Freund <andres@anarazel.de> writes: > On 2021-03-16 14:44:55 -0400, Stephen Frost wrote: >> OOMs errors should be gracefully handled and PG should continue to >> function. Was that not the case..? > Depends on what you mean with graceful. Unless you restart the database > you'll eventually not be able to do anything anymore, since even the > smallest memory allocation will fail? Yeah, a leak in the postmaster is not gonna end well. I went ahead and back-patched e0e569e1d. While looking at that, I noticed that the load_dh_file subroutine was also a few DH_frees shy of a load, so I fixed that too. regards, tom lane
Commits
-
Fix memory leak when rejecting bogus DH parameters.
- ad6c19066d93 10.17 landed
- 8c830148d2d4 11.12 landed
- 2f31414f4322 12.7 landed
- 4b41f6923458 13.3 landed
- e835e89a0fd2 14.0 landed
-
Fix memory leak when initializing DH parameters in backend
- c49e287a8e4d 11.12 landed
- 992cba94d38e 12.7 landed
- 7d9629ed2f69 10.17 landed
- e0e569e1d192 13.0 landed
-
Avoid corner-case memory leak in SSL parameter processing.
- 4b12ab18c9d0 14.0 landed
- a2764d87df04 11.12 landed
- 7ce7f2b79890 10.17 landed
- 6e34755560aa 12.7 landed
- 4d072bf2a031 13.3 landed