Re: Auto-explain patch

Поиск
Список
Период
Сортировка
От ITAGAKI Takahiro
Тема Re: Auto-explain patch
Дата
Msg-id 20080829112710.7B5B.52131E4D@oss.ntt.co.jp
обсуждение исходный текст
Ответ на Re: Auto-explain patch  (Dean Rasheed <dean_rasheed@hotmail.com>)
Список pgsql-hackers
Dean Rasheed <dean_rasheed@hotmail.com> wrote:

> Is it only available to superusers?

Presently, yes.

> Do we have a general policy on
> this? Most logging options are superuser-only, but the recent changes
> to LOG debug_print_* output have left them PGC_USERSET.

I set it PGC_SUSET because other log_* options have PGC_SUSET.
I'm not sure what is the difference between log_* and debug_* ...

I think the best policy is to allow general users only to turn "on"
those options, but not to turn "off" if the default setting is on.
We might need to get default values in postgresq.conf in the context
of assignment.

Here is a psesudo code. Is it possible?

bool log_xxx_assign_hook(newval, source)
{   if (by SET command && !superuser())   {       if (default_value == true && newval == false)           elog(ERROR,
"Youcannot turn off the loggging option");   }   return true; /* ok, you can reset it */
 
}

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center




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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: [patch] GUC source file and line number
Следующее
От: "Ryan Bradetich"
Дата:
Сообщение: statement_cost_limit for regression testing.