hide_statements_in_log
is a simple PostgreSQL extensions which hides sensitive
information from logs like query and plans.
This extension is designed for use in shared_preload_libraries.
-> select name, short_desc, boot_val from pg_settings where name like 'hide_statements_in_log%';
-[ RECORD 1 ]-----------------------------------------
name | hide_statements_in_log.delete_log
short_desc | Delete log entry with statement.
boot_val | on
-[ RECORD 2 ]-----------------------------------------
name | hide_statements_in_log.dummy_message
short_desc | Replace statement in log entry with text.
boot_val | statement is hidden
$ # export PG_CONFIG=/path/to/pg_config
$ make && make install
- Unfortunately, postgresql log_hook gets translated messages, now we delete entire message, but need to find a workaround.
- Need to have possibility to redirect deleted entries into STDOUT/SYSLOG.