Andres Freund <andres@anarazel.de> writes:
> On 2017-11-12 22:28:11 +0000, gregburek@heroku.com wrote:
>> [ canceled queries aren't accounted for by pg_stat_statements ]
> One way to address this at least partially would be to add a counter for
> initiated queries and a counter for completed queries (the current
> one). If all the rest of the counters are left the same the issue from
> above isn't there, and you'd not even need an exception handler to
> update counters.
That seems like an idea well worth looking into, seeing that there's
already a code path that inserts the entry into the shared table before
execution starts.
This would not account for queries that fail at parse or plan time,
but hopefully those generally don't run long enough to be a problem.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs