Re: Auto-explain patch

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Auto-explain patch
Дата
Msg-id 1215616093.4051.1109.camel@ebony.2ndQuadrant
обсуждение исходный текст
Ответ на Re: Auto-explain patch  (Dean Rasheed <dean_rasheed@hotmail.com>)
Список pgsql-hackers
On Wed, 2008-07-09 at 12:01 +0000, Dean Rasheed wrote:
> > Just set client_min_messages = 'LOG';
> 
> True, but you would still need to be a superuser to to set the min_durations and
> explain parameters. 

No

> The other advantage of client_sql_trace is that you could
> debug your own functions without filling up the log file. It would work better for
> multiple users sharing the same DB.

Not sure about that. We have debuggers and dbms_put_line already.

I think it would be better to introduce a new logging category than to
do something just specifically for this situation. 

Suggest new level=TRACE. This allows messages which are not typically
logged by server, yet are specifically requested by client. Admin has
the option to log the messages if desired.

Server log sequence is
DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, INFO, NOTICE, WARNING, ERROR,
*TRACE*, LOG, FATAL, and PANIC.

Rationale for placement: Default is LOG, so TRACE messages not logged by
default. Sometimes set to ERROR. Setting at this position allows full
system trace to be taken if required, then reset when trace complete.

Client log Sequence is
DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, LOG, NOTICE, *TRACE*, WARNING,
ERROR, FATAL, and PANIC.

Rationale for placement: many NOTICE messages are generated by various
commands, so many people can still set this off and still get TRACE
messages.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Auto-explain patch
Следующее
От: "Stuart Gundry"
Дата:
Сообщение: Security and Data Protection Issues