Re: [BUGS] BUG #14901: Canceled queries missing from pg_stat_statements - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] BUG #14901: Canceled queries missing from pg_stat_statements
Date
Msg-id 4671.1510537167@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] BUG #14901: Canceled queries missing frompg_stat_statements  (Andres Freund <andres@anarazel.de>)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [BUGS] BUG #14897: Segfault on statitics SQL request
Next
From: Amit Langote
Date:
Subject: Re: [BUGS] BUG #14866: The generated constraint in the typed tablecauses the server to crash