log_statement_sample_rate

A configuration parameter which enables a sample of all statement types to be logged

log_statement_sample_rate is a configuration parameter which enables a sample of all statement types to be logged which exceed the execution time threshold defined in log_min_duration_sample, provided this value is lower than log_min_duration_statement.

log_statement_sample_rate was added in PostgreSQL 13 (commit 6e3e6cc0).

Default

The default value for log_statement_sample_rate is 1.0.

Change history

Note: log_statement_sample_rate was originally added during the PostgreSQL 12 development cycle (commit 88bdbd3f) and reverted in commit 75506195.

Categories

Configuration, Logging

See also

log_min_duration_sample, log_min_duration_statement, log_transaction_sample_rate