Does PostgreSQL record under which user a settings change was carried out?
For example, view if user "postgres" changed the wal_level, or "userA".
If so, how/where can the log be seen?
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.
Sign up to join this communityDoes PostgreSQL record under which user a settings change was carried out?
For example, view if user "postgres" changed the wal_level, or "userA".
If so, how/where can the log be seen?
Changing wal_level
is something that requires a server restart. It can be done in three ways:
edit postgresql.conf
and restart the server
change the setting with ALTER SYSTEM
and restart the server
stop the server and restart it with -c wal_level=whatever
The first and the third options don't involve an SQL statement or a database user, so they won't leave a trace in the database. You can record calls to ALTER SYSTEM
by setting log_statement = 'ddl'
.
So in general, there is no way to find out when and by whom wal_level
was changed.