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
- PostgreSQL 13
- added (commit 6e3e6cc0)
Note: log_statement_sample_rate
was originally added during the PostgreSQL 12 development cycle (commit 88bdbd3f) and reverted in commit 75506195.
References
- PostgreSQL documentation: log_statement_sample_rate
Useful links
- Waiting for PostgreSQL 13 – Allow sampling of statements depending on duration - blog article by Hubert 'depesz' Lubaczewski, 2019-11