Re: Is there anyway for non-superuser to log all sql statements at the session level?

Поиск
Список
Период
Сортировка
От Scott Ribe
Тема Re: Is there anyway for non-superuser to log all sql statements at the session level?
Дата
Msg-id B2D5A861-5FF0-4CB0-90B9-A6422EB0D470@elevated-dev.com
обсуждение исходный текст
Ответ на Re: Is there anyway for non-superuser to log all sql statements at the session level?  (Hotmail <crajac66@hotmail.com>)
Список pgsql-admin
> On Sep 9, 2021, at 9:18 PM, Hotmail <crajac66@hotmail.com> wrote:
>
> Thanks for the suggestion. We currently use pgaudit at the database level for all ddL. Unfortunately, you must be a
superuserto change pgaudit  settings at the session level. Our desire is to capture the ddl/dml for a specific session.
Capturing the dml at the database level with pgaudit would generate too much logging with our application user. Our
migrationsscripts are all checked into a git repo.  
>
> We would like to get specific timestamp/timing info for each migration ddl/dml statement as it is executed. May not
bepossible in postgres for a non-superuser. We recently migrated off Oracle and we were able to do this as a
non-superuserwith session tracing but we are not aware similar capabilities in postgres. 

Can't you use a single-purpose user to run migration scripts, and pgaudit to log everything that user does?







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

Предыдущее
От: Hotmail
Дата:
Сообщение: Re: Is there anyway for non-superuser to log all sql statements at the session level?
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: Blank page