pgbadger icon indicating copy to clipboard operation
pgbadger copied to clipboard

log_min_duration_statement set to 0 - records all the parameters

Open tejaswikt opened this issue 1 year ago • 1 comments

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 ?

tejaswikt avatar Apr 23 '24 20:04 tejaswikt

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.

darold avatar Apr 23 '24 20:04 darold