From: Arthur Zakirov <a.zakirov@postgrespro.ru>
To: legrand legrand <legrand_legrand@hotmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: pg_stat_statements : how to catch non successfully finished statements ?
Date: Fri, 27 Apr 2018 14:45:04 +0300
Message-ID: <20180427114503.GA12829@zakirov.localdomain> (raw)
In-Reply-To: <1524774265469-0.post@n3.nabble.com>
References: <1524774265469-0.post@n3.nabble.com>
Hello,
On Thu, Apr 26, 2018 at 01:24:25PM -0700, legrand legrand wrote:
> Hello all,
>
> I was wondering if there is a hook to collect non successfully finished SQL
> statements in pg_stat_statements (timed-out, cancelled, killed, or simply
> errored) ?
Some time ago I looked for a such hook. My case was to log failed access
permissions checks. I didn't find a way to do it, except adding a
narrow-focused hook within ExecCheckRTPerms().
There is ErrorContextCallback. Context callbacks are called when an
error was raised. But I don't think that it is a good approach for
pg_stat_statements cases.
--
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
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-general@postgresql.org
Cc: a.zakirov@postgrespro.ru, legrand_legrand@hotmail.com
Subject: Re: pg_stat_statements : how to catch non successfully finished statements ?
In-Reply-To: <20180427114503.GA12829@zakirov.localdomain>
References: <1524774265469-0.post@n3.nabble.com> <20180427114503.GA12829@zakirov.localdomain>
* 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