Re: Adding support for SSLKEYLOGFILE in the frontend

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, Abhishek Chanda <abhishek(dot)becs(at)gmail(dot)com>, Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: Adding support for SSLKEYLOGFILE in the frontend
Date: 2025-07-01 08:47:06
Message-ID: CB232FF2-7FCA-4C9D-8E0B-7CA0B53B06F8@yesql.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 29 Jun 2025, at 12:56, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>
> On 27.06.25 11:15, Daniel Gustafsson wrote:
>>> On 26 Jun 2025, at 23:06, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>>> I'll propose changes for these comments in the morning when coffee has been
>>> had.
>> The attached moves to logging on stderr along with a test for this, and also
>> removes the WARNING prefix that was added to the other stderr loggings since
>> that seems out of place compared to other stderr loggings in libpq (the
>> sslpassword trunction WARNING is clearly warranted, these were not).
>
> Hmm, I thought the WARNING prefixes were good. I think these are similar to
>
> "WARNING: password file \"%s\" is not a plain file\n"
>
> in that something during the connection setup is being ignored.
>
> Otherwise, if you just write something but don't tag it with something like warning or error, it's not clear how the user is supposed to interpret it. Is it a progress message, is it something bad, etc.?

Fair. As this is a connection debugging tool and not for regular use I wasn't
thinking of them as warnings per se (I was more classifying them as the "out of
memory" errors which are printed without a prefix), but I also don't mind
adding them back. Done in v2 with other comments addressed as well.

--
Daniel Gustafsson

Attachment Content-Type Size
v2-0001-Fix-sslkeylogfile-error-handling-logging.patch application/octet-stream 4.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2025-07-01 08:54:24 Re: Conflict detection for update_deleted in logical replication
Previous Message Rintaro Ikeda 2025-07-01 08:43:18 Re: Suggestion to add --continue-client-on-abort option to pgbench