Hi, On 2022-07-15 14:51:38 -0700, Jacob Champion wrote: > > We already have pg_clean_ascii() and use it for application_name, fwiw. > > That seems much worse than escaping for this particular patch; if your > cert's Common Name is in (non-ASCII) UTF-8 then all you'll see is > "CN=?????????" in the log lines that were supposed to be helping you > root-cause. Escaping would be much more helpful in this case.
I'm doubtful that's all that common. But either way, I suggest a separate patch to deal with that... Greetings, Andres Freund