Re: pg_stat_statements : how to catch non successfully finished statements ?

From: Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>
To: legrand legrand <legrand_legrand(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_stat_statements : how to catch non successfully finished statements ?
Date: 2018-04-27 11:45:04
Message-ID: 20180427114503.GA12829@zakirov.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steven Lembark 2018-04-27 14:15:45 Re: Long running INSERT+SELECT query
Previous Message Bruno Lavoie 2018-04-27 11:39:06 Fwd: Failed rpm package signature checks with reposync