ALTER USER SET log_* not allowed... - Mailing list pgsql-bugs

From Sean Chittenden
Subject ALTER USER SET log_* not allowed...
Date
Msg-id B0599BF6-3228-11D9-8062-000A95C705DC@chittenden.org
Whole thread Raw
Responses Re: ALTER USER SET log_* not allowed...
List 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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Deadlock or other hang while vacuuming?
Next
From: Tom Lane
Date:
Subject: Re: ALTER USER SET log_* not allowed...