Re: process type escape for log_line_prefix

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: process type escape for log_line_prefix
Дата
Msg-id CAB7nPqS=wBbZzBcty1KyN-5Y9bPXZ+deJbfcCtebf06eF2Uyvg@mail.gmail.com
обсуждение исходный текст
Ответ на process type escape for log_line_prefix  (Andres Freund <andres@anarazel.de>)
Ответы Re: process type escape for log_line_prefix  (Christoph Berg <myon@debian.org>)
Список pgsql-hackers
On Mon, Feb 8, 2016 at 11:32 PM, Andres Freund <andres@anarazel.de> wrote:
> Frequently when reading postgres logs to do some post mortem analysis
> I'm left wondering what process emitted an error/log message. After the
> fact it's often hard to know wether an error message was emitted by a
> user backend or by something internal, say the checkpointer or
> autovacuum.  Logging all process starts is often impractical given the
> log volume that causes.
>
> So I'm proposing adding an escape displaying the process title (say 'k'
> for kind?). So %k would emit something like "autovacuum worker process",
> "wal sender process" etc.

It would be nice to get something consistent between the ps output and
this new prefix, say with for example a miscadmin.h parameter like
MyProcName.

> I'm thinking it might make sense to give normal connections "" as the
> name, they're usually already discernible.

Yeah, that sounds fine for me. What about background workers? I would
think that they should use BackgroundWorker->bgw_name.
-- 
Michael



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Bug in StartupSUBTRANS
Следующее
От: Jeff Janes
Дата:
Сообщение: pgcrypto: add s2k-count