Re: [PATCH] SQL function to report log message

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [PATCH] SQL function to report log message
Дата
Msg-id CAB7nPqSS0w_Fxs3hdxKbUj8HYNRLu_NajSKcx=MzP6QCidh-aQ@mail.gmail.com
обсуждение исходный текст
Ответ на [PATCH] SQL function to report log message  (dinesh kumar <dineshkumar02@gmail.com>)
Ответы Re: [PATCH] SQL function to report log message  (dinesh kumar <dineshkumar02@gmail.com>)
Список pgsql-hackers
On Mon, Jul 13, 2015 at 4:54 PM, dinesh kumar <dineshkumar02@gmail.com> wrote:
> Would like to discuss on below feature here.
>
> Feature:
>     Having an SQL function, to write messages to log destination.
>
> Justification:
>     As of now, we don't have an SQL function to write custom/application
> messages to log destination. We have "RAISE" clause which is controlled by
> log_ parameters. If we have an SQL function which works irrespective of log
> settings, that would be a good for many log parsers. What i mean is, in DBA
> point of view, if we route all our native OS stats to log files in a proper
> format, then we can have our log reporting tools to give most effective
> reports. Also, Applications can log their own messages to postgres log
> files, which can be monitored by DBAs too.

What's the actual use case for this feature other than it would be
good to have it? A log message is here to give information about the
state of something that happens in backend, but in the case of this
function the event that happens is the content of the function itself.
It also adds a new log level for something that has a unique usage,
which looks like an overkill to me. Btw, you could do something more
advanced with simply an extension if you really want to play with this
area... But I am dubious about what kind of applications would use
that.
-- 
Michael



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

Предыдущее
От: dinesh kumar
Дата:
Сообщение: [PATCH] SQL function to report log message
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: TABLESAMPLE patch is really in pretty sad shape