darold / pgbadger

A fast PostgreSQL Log Analyzer
http://pgbadger.darold.net/
PostgreSQL License
3.45k stars 348 forks source link

log_min_duration_statement set to 0 - records all the parameters #823

Open tejaswikt opened 2 months ago

tejaswikt commented 2 months ago

Hi , we have set log_min_duration_statement = 0 , this is causing to record all values of ,

1) select * from table where id = 2) update table set id = where id = 3) delete from table where id =

I want to mask all these values for the complete database and not to be printed in the logs, as this will have security issue .

is there any statement to be set to mask the values and pass as literals ?

darold commented 2 months ago

For pgbadger you can use the dedicated command line option to obfuscate the values:

    --anonymize : obscure all literals in queries, useful to hide confidential data.

In PostgreSQL logs, there is no way to do that.