model-writtenrun 8922 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Dmitry Uspenskiy reported a LeakSanitizer-detected leak during SSL initialization and identified the need to release DH parameters after SSL_CTX_set_tmp_dh() #1.
- Michael Paquier checked OpenSSL's ownership behavior and attached a successful-path DH_free() fix; although repeated SSL reloads could accumulate leaked memory, he initially considered the leak too small to warrant backpatching #2.
- Michael committed e0e569e1d1 with an additional error-path cleanup that Dmitry had requested offline, then announced completion #3.
- Jelte Fennema-Nio reopened the issue after production failures on PostgreSQL 11: frequent SIGHUPs accumulated postmaster memory that multiplied across connections in committed-memory accounting with overcommit disabled, motivating a backpatch request #4.
- Tom Lane questioned whether other SSL initialization leaks contributed, and Jelte used Valgrind to isolate the original leak while also reproducing a separate root_cert_list leak when CRL loading failed #5 #6.
- Tom's repeated-SIGHUP testing found visible leakage on PostgreSQL 12 but none on HEAD, supporting backpatching; Tom and Andres Freund also agreed that immediately assigning root_cert_list to the temporary SSL context would make error cleanup release it #7 #8 #9.
- Stephen Frost supported backpatching while cautioning against interpreting the report as a reason to enable overcommit, and Jelte clarified that allocation failures were handled gracefully and that changing overcommit policy was not his proposed solution #11 #12.
- Tom implemented the root-certificate ownership change and added memory-management comments in 4b12ab18c9, addressing the separate error-path leak discussed in #6 #8.
- Andres suggested explicitly marking intentionally permanent allocations to reduce leak-detector false positives, and Michael supported the idea, but the thread contains no implementation of that broader proposal #10 #13.
- After Andres emphasized that continued postmaster leakage would eventually prevent even small allocations, Tom backpatched the original DH fix through PostgreSQL 10 in 7d9629ed2f and announced the backpatch #14 #15.
- While backpatching, Tom found three additional missing DH_free() calls when load_dh_file() rejects invalid parameters and fixed them in e835e89a0f #15.
- The thread ended with the concrete leak fixes landed and Stephen clarifying that his earlier questions sought additional problems rather than opposing the fixes or backpatches #16.