> On Sep 9, 2021, at 9:18 PM, Hotmail <crajac66@xxxxxxxxxxx> wrote: > > Thanks for the suggestion. We currently use pgaudit at the database level for all ddL. Unfortunately, you must be a superuser to 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 migrations scripts 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 be possible in postgres for a non-superuser. We recently migrated off Oracle and we were able to do this as a non-superuser with 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?