ALTER USER SET log_* not allowed...

From: Sean Chittenden <sean(at)chittenden(dot)org>
To: PGBugs List <pgsql-bugs(at)postgresql(dot)org>
Subject: ALTER USER SET log_* not allowed...
Date: 2004-11-09 08:23:52
Message-ID: B0599BF6-3228-11D9-8062-000A95C705DC@chittenden.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I've got a particular database account that connects/disconnects
hundreds of times a second, literally (email delivery agent). Being
the ever ready logger that I am, I have a number of logging bits turned
on to help me identify problems when they come up. In this case, I'm
not worried about a problem and want to turn off most logging for this
particular user. I can issue an ALTER USER [usr] SET log_* =
false/none in all cases, except for log_duration.

db=# ALTER USER dbmail SET log_disconnections = false;
ERROR: parameter "log_disconnections" cannot be set after connection
start

:-/ I use disconnections as the way of noting the number of
connections. Regardless, I think I'm off to the races... BUT! not
quite:

INFO: permission denied to set parameter "log_statement"
HINT: Must be superuser to increase this value.
INFO: permission denied to set parameter "log_duration"
HINT: Must be superuser to change this value to false.

doh! So much for that idea. There's no real way to have some
useconfig variables run by the super user and some run by the session
user. My workaround is to have the program call a SECURITY DEFINER
function, but I'd be nice to be able to remove that hack. Anyway,
something to consider next time the system catalogs are being tweaked.
-sc

--
Sean Chittenden

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Fabio 2004-11-09 12:15:17 Bug no tipo de dados "text" do PostgreSQL 8.0-beta1
Previous Message Prabhu Ram Prasath V 2004-11-09 05:52:30 Bug in Installation