ALTER USER SET log_* not allowed...

Поиск
Список
Период
Сортировка
От Sean Chittenden
Тема ALTER USER SET log_* not allowed...
Дата
Msg-id B0599BF6-3228-11D9-8062-000A95C705DC@chittenden.org
обсуждение исходный текст
Ответы Re: ALTER USER SET log_* not allowed...  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Deadlock or other hang while vacuuming?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ALTER USER SET log_* not allowed...