Karoline Pauls <c...@karolinepauls.com> writes: > On Friday, 10 May 2024 at 20:17, Bruce Momjian <br...@momjian.us> wrote: >> log_line_prefix supports application name --- why would you not use >> that?
> log_line_prefix is effective in the server log. This change is mostly about > improving the message sent back to the client. While the server log is also > changed to reflect the client message, it doesn't need to be. It's normally necessary to look at the server log anyway if you want to figure out what caused the deadlock, since the client message intentionally doesn't provide query texts. I think this proposal doesn't move the goalposts noticeably: it seems likely to me that in many installations the sessions would mostly all have the same application_name, or at best not-too-informative names like "psql" versus "PostgreSQL JDBC Driver". (If we thought these names *were* really informative about what other sessions are doing, we'd probably have to hide them from unprivileged users in pg_stat_activity, and then there'd also be a security concern here.) On the whole I'd reject this proposal as causing churn in application-visible behavior for very little gain. regards, tom lane