pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Delay creation of SSL_CTX structure to allow cleanup
2+ messages / 1 participants
[nested] [flat]

* pgsql: Delay creation of SSL_CTX structure to allow cleanup
@ 2026-10-06 11:52 Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Daniel Gustafsson @ 2026-10-06 11:52 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Delay creation of SSL_CTX structure to allow cleanup

Avoid initializing the OpenSSL SSL_CTX structure for a new host
until it has been checked for errors.  The cleanup can only see
hosts which were successfully added so the previous coding would
leak the SSL_CTX on failed reloads.

Author: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Rui Zhao <zhaorui126@gmail.com>
Discussion: https://postgr.es/m/A1745424-7110-41E9-B98C-3CED1A034A8F@yesql.se
Backpatch-through: 19

Branch
------
master

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

Modified Files
--------------
src/backend/libpq/be-secure-openssl.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)



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

* pgsql: Delay creation of SSL_CTX structure to allow cleanup
@ 2026-10-06 11:52 Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Daniel Gustafsson @ 2026-10-06 11:52 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Delay creation of SSL_CTX structure to allow cleanup

Avoid initializing the OpenSSL SSL_CTX structure for a new host
until it has been checked for errors.  The cleanup can only see
hosts which were successfully added so the previous coding would
leak the SSL_CTX on failed reloads.

Author: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Rui Zhao <zhaorui126@gmail.com>
Discussion: https://postgr.es/m/A1745424-7110-41E9-B98C-3CED1A034A8F@yesql.se
Backpatch-through: 19

Branch
------
REL_19_STABLE

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

Modified Files
--------------
src/backend/libpq/be-secure-openssl.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)



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


end of thread, other threads:[~2026-10-06 11:52 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-10-06 11:52 pgsql: Delay creation of SSL_CTX structure to allow cleanup Daniel Gustafsson <dgustafsson@postgresql.org>
2026-10-06 11:52 pgsql: Delay creation of SSL_CTX structure to allow cleanup Daniel Gustafsson <dgustafsson@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