From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Lukas Fittl <lukas(at)fittl(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Subject: | Re: Procedure calls are not tracked in pg_stat_user_functions / track_functions |
Date: | 2018-10-04 20:07:15 |
Message-ID: | 20181004200715.7cgrxyaxnep3mveu@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2018-10-04 12:15:28 -0700, Lukas Fittl wrote:
> Hi all,
>
> It seems that currently procedures do not get tracked when track_functions
> is enabled, which means one needs to resort to other workarounds in order
> to monitor procedure calls/runtime.
>
> To illustrate:
>
> =# SHOW track_functions;
> ┌─────────────────┐
> │ track_functions │
> ├─────────────────┤
> │ all │
> └─────────────────┘
> (1 row)
>
> =# CALL abc();
> CALL
>
> =# SELECT def();
> ┌─────┐
> │ def │
> ├─────┤
> │ │
> └─────┘
> (1 row)
>
> =# SELECT * FROM pg_stat_user_functions;
> ┌─[ RECORD 1 ]────────────────────┐
> │ funcid │ 75223 │
> │ schemaname │ public │
> │ funcname │ def │
> │ calls │ 1 │
> │ total_time │ 3.222 │
> │ self_time │ 3.222 │
> └────────────┴────────────────────┘
>
> Was this intentional, or an oversight?
>
> If welcome, I would be happy to work on a patch. Whilst slightly confusing
> in terms of naming, we could just track this together with functions, since
> one can always join with pg_proc to determine whether something is a
> function or a procedure.
Yea, that sounds wrong / not ideal to me. I think we should just fix
this, should be easy enough.
- Andres
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-10-04 20:40:25 | Re: executor relation handling |
Previous Message | Pierre Ducroquet | 2018-10-04 20:00:35 | Re: Poor plan when using EXISTS in the expression list |