From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: gregburek@heroku.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14901: Canceled queries missing from pg_stat_statements
Date: Sun, 12 Nov 2017 20:39:27 -0500
Message-ID: <4671.1510537167@sss.pgh.pa.us> (raw)
In-Reply-To: <20171112223906.dqtl3kk3pd7vn6yc@alap3.anarazel.de>
References: <20171112222811.1464.28388@wrigleys.postgresql.org>
<20171112223906.dqtl3kk3pd7vn6yc@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, gregburek@heroku.com
Subject: Re: BUG #14901: Canceled queries missing from pg_stat_statements
In-Reply-To: <4671.1510537167@sss.pgh.pa.us>
References: <20171112222811.1464.28388@wrigleys.postgresql.org> <20171112223906.dqtl3kk3pd7vn6yc@alap3.anarazel.de> <4671.1510537167@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox