pg_stat_statements opening claim is potentially misleading

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: cduncan(at)heroku(dot)com
Subject: pg_stat_statements opening claim is potentially misleading
Date: 2018-05-15 04:49:53
Message-ID: 152635979367.27210.11388874802673812888@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/static/pgstatstatements.html
Description:

At the top of the pg_stat_statements docs page[1] it states:

"The pg_stat_statements module provides a means for tracking execution
statistics of all SQL statements executed by a server."

This is not strictly true. In cases where large numbers of queries are
cancelled, such as by `statement_timeout` on a loaded server, they are not
in fact recorded by pg_stat_statements. This has been brought up on the
mailing list [2] and has been stated as the intended behavior. This can be
surprising particularly if cancelled queries account for a large amount of
server execution time in pathological cases.

Perhaps a simple change such as this would help clarify this:

"The pg_stat_statements module provides a means for tracking execution
statistics of all SQL statements successfully executed by a server."

Or an explicit callout that cancelled queries do not count regardless of how
much execution time they actually use.

-Casey

[1] https://www.postgresql.org/docs/10/static/pgstatstatements.html
[2]
https://www.postgresql.org/message-id/20171112222811.1464.28388%40wrigleys.postgresql.org

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2018-05-15 10:20:15 Incorrect description of the WITH CHECK in the row security can lead to the security issue
Previous Message Tom Lane 2018-05-14 16:08:44 Re: typo fix in release notes 10.4