Question about performance impact when change log_statement from ddl to all

Hi,

We plan to audit all action of Percona postgresql v17 by change log_statement from ddl to all, please advise:

1/ performance impact, is there any document for compare performance when change this parameter for busy OLTP system

2/ Any extension or another solution for audit all action in Percona Postgresql?

Hi cuongtm02,

  1. The performance impact will be higher the bigger your workload (and depending QPS , query length and disk performance). You should do your benchmarks for your system/workload/hw

  2. Not that I am aware of

Regards

1 Like

Hi,

Asking about performance when logging “everything” is an open question. As per the last posting it really depends on your system load. and the easiest way to test it is to use tools like iostat, dstat, top etc.

But another issue you need to consider in addition to load is space consumed by the logs.

It might be useful looking into these other runtime parameters as you consider your options:

  • log_min_duration_statement
  • log_min_duration_sample
  • log_statement_sample_rate
  • log_transaction_sample_rate
  • log_statement_stats

Hope this helps :slight_smile:

1 Like