Re: Augmenting the deadlock message with application_name

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Augmenting the deadlock message with application_name
Дата
Msg-id 1636764.1715374887@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Augmenting the deadlock message with application_name  (Karoline Pauls <code@karolinepauls.com>)
Список pgsql-hackers
Karoline Pauls <code@karolinepauls.com> writes:
> On Friday, 10 May 2024 at 20:17, Bruce Momjian <bruce@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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: pg_sequence_last_value() for unlogged sequences on standbys
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Augmenting the deadlock message with application_name