Re: Auto-explain patch - Mailing list pgsql-hackers

From ITAGAKI Takahiro
Subject Re: Auto-explain patch
Date
Msg-id 20080829112710.7B5B.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Re: Auto-explain patch  (Dean Rasheed <dean_rasheed@hotmail.com>)
List 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 by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: [patch] GUC source file and line number
Next
From: "Ryan Bradetich"
Date:
Subject: statement_cost_limit for regression testing.