From: | ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Dean Rasheed <dean_rasheed(at)hotmail(dot)com> |
Cc: | <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com> |
Subject: | Re: Auto-explain patch |
Date: | 2008-08-29 02:49:23 |
Message-ID: | 20080829112710.7B5B.52131E4D@oss.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Dean Rasheed <dean_rasheed(at)hotmail(dot)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, "You cannot turn off the loggging option");
}
return true; /* ok, you can reset it */
}
Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Ryan Bradetich | 2008-08-29 02:57:10 | statement_cost_limit for regression testing. |
Previous Message | PoolSnoopy | 2008-08-29 01:19:09 | Re: libpq does not manage SSL callbacks properly when other libraries are involved. |