idea: log_statement_sample_rate - bottom limit for sampling

Pavel Stehule <pavel.stehule@gmail.com>

From: Pavel Stehule <pavel.stehule@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2019-06-06T08:38:04Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Revert "Add log_statement_sample_rate parameter"

  2. Revert "Silence compiler warning"

Hi

I like the idea of sampling slow statements via  log_statement_sample_rate.
But I miss some parameter that can ensure so every query executed over this
limit is logged.

Can we introduce new option

log_statement_sampling_limit

The query with execution time over this limit is logged every time.

What do you think about this?

Regards

Pavel