pg_stat_statements is recording passwords also, is there any way to avoid the logging of passwords without droping extension package. testdb=> create user test1 with password 'test123'; CREATE ROLE testdb=> create user test2 with encrypted password 'test123'; CREATE ROLE test=> select query from pg_stat_statements where query like '%test%'; query ----------------------------------------------------------- create user test1 with encrypted password 'test123' create user test2 with password 'test123'
pg_stat_statements has parameter "pg_stat_statements.track_utility" to control whether utility commands are tracked. It is on by default.