Re: BUG #14162: No statistics for functions used as aggregates

From: Daniel Migowski <dmigowski(at)ikoffice(dot)de>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14162: No statistics for functions used as aggregates
Date: 2016-05-31 05:47:58
Message-ID: 41ED3F5450C90F4D8381BC4D8DF6BBDCAF46539E@EXCHANGESERVER.ikoffice.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Ok, then no statistics for me :). If this is intentional, a small line or warning in the docs would be helpful.

I also wonder if in and out functions of datatypes are tracked (As they a C functions) or if there are other places where function tracking isn't implemented although the functions get called (maybe on index creation, etc.). I need this information because I currently try to decide if I have to convert some of these functions to native c functions.

-----Ursprüngliche Nachricht-----
Von: Michael Paquier [mailto:michael(dot)paquier(at)gmail(dot)com]
Gesendet: Dienstag, 31. Mai 2016 06:57
An: Daniel Migowski <dmigowski(at)ikoffice(dot)de>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Betreff: Re: [BUGS] BUG #14162: No statistics for functions used as aggregates

On Mon, May 30, 2016 at 4:56 PM, Daniel Migowski <dmigowski(at)ikoffice(dot)de> wrote:
> Yes, I am sure. To measure my function I had to recreate it with a different name, and create a plpgsql wrapper function with the original signature that calls it. Now I was able to get my results and the function showed up in the stats. The wrapper didn't!

(please do not top-post it breaks the logic of the thread).
Ah I see I got confused, nodeAgg.c does not track statistics of the transition or final functions when an aggregate is invoked, and has never done it. There is no call to pgstat_init_function_usage() when
FunctionCallInvoke() is called so you cannot track statistics regarding that. Maybe that would be a interesting feature, but controlled by a different GUC than track_functions.
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message davygora 2016-05-31 14:32:13 BUG #14166: JDBC driver won't parse error message from DB server in German
Previous Message Michael Paquier 2016-05-31 04:56:38 Re: BUG #14162: No statistics for functions used as aggregates