pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix sslkeylogfile error handling logging 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix sslkeylogfile error handling logging @ 2025-07-10 21:37 Daniel Gustafsson <dgustafsson@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Daniel Gustafsson @ 2025-07-10 21:37 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix sslkeylogfile error handling logging When sslkeylogfile has been set but the file fails to open in an otherwise successful connection, the log entry added to the conn object is never printed. Instead print the error on stderr for increased visibility. This is a debugging tool so using stderr for logging is appropriate. Also while there, remove the umask call in the callback as it's not useful. Issues noted by Peter Eisentraut in post-commit review, backpatch down to 18 when support for sslkeylogfile was added Author: Daniel Gustafsson <daniel@yesql.se> Reported-by: Peter Eisentraut <peter@eisentraut.org> Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/70450bee-cfaa-48ce-8980-fc7efcfebb03@eisentraut.org Backpatch-through: 18 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/a6c0bf93031dac8701b8d6c1093230dc5caf190d Modified Files -------------- src/interfaces/libpq/fe-secure-openssl.c | 20 ++++++++++++-------- src/test/ssl/t/001_ssltests.pl | 7 +++++++ 2 files changed, 19 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix sslkeylogfile error handling logging @ 2025-07-10 21:39 Daniel Gustafsson <dgustafsson@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Daniel Gustafsson @ 2025-07-10 21:39 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix sslkeylogfile error handling logging When sslkeylogfile has been set but the file fails to open in an otherwise successful connection, the log entry added to the conn object is never printed. Instead print the error on stderr for increased visibility. This is a debugging tool so using stderr for logging is appropriate. Also while there, remove the umask call in the callback as it's not useful. Issues noted by Peter Eisentraut in post-commit review, backpatch down to 18 when support for sslkeylogfile was added Author: Daniel Gustafsson <daniel@yesql.se> Reported-by: Peter Eisentraut <peter@eisentraut.org> Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/70450bee-cfaa-48ce-8980-fc7efcfebb03@eisentraut.org Backpatch-through: 18 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/39f01083facd0ddc0040662a71159e9987813c2c Modified Files -------------- src/interfaces/libpq/fe-secure-openssl.c | 20 ++++++++++++-------- src/test/ssl/t/001_ssltests.pl | 7 +++++++ 2 files changed, 19 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-07-10 21:39 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-07-10 21:37 pgsql: Fix sslkeylogfile error handling logging Daniel Gustafsson <dgustafsson@postgresql.org> 2025-07-10 21:39 pgsql: Fix sslkeylogfile error handling logging 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