Note: When both pgaudit.log and log_statement are set to DDL, then log_statement must be set to none at the session level.Ĭreate your password hash locally, and then use the hash when creating or altering the role or user password. Set the log_statement parameter to none at the session level inside a transaction block to stop PostgreSQL from recording the operation entirely. PASSWORD, Set log_statement to none at the session level inside a transaction block Output in logs: 13:33:50 SESSION,3,1,ROLE,CREATE ROLE,CREATE ROLE test_role WITH LOGIN You can log CREATE/ALTER ROLE by adding ROLE to pgaudit.log. Note: The main difference between pgaudit.log='DDL' and log_statement='DDL' is that pgaudit, DDL doesn't record any CREATE/ALTER ROLE query in Postgres logs. This parameter can take multiple values, like DDL, role, write, and read.
0 Comments
Leave a Reply. |