Re: Fwd: Functions not visible in pg_stat_user_functions view

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Bartosz Dmytrak *EXTERN*" <bdmytrak(at)gmail(dot)com>, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Fwd: Functions not visible in pg_stat_user_functions view
Date: 2013-01-30 08:35:48
Message-ID: A737B7A37273E048B164557ADEF4A58B057AD4AC@ntex2010a.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bartosz Dmytrak wrote:
> and this is strange for me.
> I have few DBs with the same function (copy -> paste), in one DB they are tracked (visible in
> pg_stat_user_functions) in other not. In DB where some functions are not tracked, others are visible -
> no issue. I cannot find any logical connection between function structure and visibility in
> pg_stat_user_functions.

If you look at the definition of pg_stat_user_functions,
you'll notice that it shows only functions for which
pg_stat_get_function_calls(oid) IS NOT NULL.

The most likely explanation for what you observe is that
the functions have never been called since track_functions
has been set to "all".

You can see if that is indeed the reason by calling one
of your "invisible" functions and see if it becomes
visible afterwards.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bartosz Dmytrak 2013-01-30 08:57:54 Re: Fwd: Functions not visible in pg_stat_user_functions view
Previous Message Tim Uckun 2013-01-30 08:35:32 Re: Dropping default privileges.