log_min_duration_statement modification for non superusers?

Поиск
Список
Период
Сортировка
От Paul McGarry
Тема log_min_duration_statement modification for non superusers?
Дата
Msg-id CAPrE0SY6+MFRBDK25F2M4Qfamz8wzvD=r9iZ=UQs570nHuwcYQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: log_min_duration_statement modification for non superusers?  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Список pgsql-general
I have a situation where I'd like to lower the
log_min_duration_statement for a particular connection
.
The DB is used for several reporting type queries which may reasonably
take several seconds so the log_min_duration_statement in the DB is
set accordingly.

However there are critical paths in the app where queries are more
interactive and we'd like to log any statements using a much lower
limit.

A superuser could, for example:
set log_min_duration_statement = 500;
when connecting to the DB but normal users can't.

Is there a trick that would allow us to enable non-super users to
lower the log_min_duration_statement value?

The only thing I have though of is connecting as a Super User and then
using "SET ROLE" to change to the non-priviledged user afterwards but
really we don't want our Super User authentication credentials on the
application server.

Thanks for any ideas,

Paul

В списке pgsql-general по дате отправления:

Предыдущее
От: Tim Uckun
Дата:
Сообщение: create database from template requires the source database to be unused
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: create database from template requires the source database to be unused