Re: How Do You Associate a Query With its Invoking Procedure?

2018-09-14 Thread Roman Konoval
If you can change the application then one option is to set application_name so that it contains API function name. This should happen before the first call in API function hits the database. After the API function finishes it should reset application_name. Then you can enable logging of all qu

Re: How Do You Associate a Query With its Invoking Procedure?

2018-09-14 Thread Rick Otten
On Fri, Sep 14, 2018 at 12:34 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Thu, Sep 13, 2018 at 12:49 PM, Fd Habash wrote: > >> In API function may invoke 10 queries. Ideally, I would like to know what >> queries are invoked by it and how long each took. >> >> >> >> I’m using pg

Re: How Do You Associate a Query With its Invoking Procedure?

2018-09-14 Thread David G. Johnston
On Thu, Sep 13, 2018 at 12:49 PM, Fd Habash wrote: > In API function may invoke 10 queries. Ideally, I would like to know what > queries are invoked by it and how long each took. > > > > I’m using pg_stat_statement. I can see the API function statement, but how > do I deterministically identify a

Re: How Do You Associate a Query With its Invoking Procedure?

2018-09-14 Thread Fred Habash
Any ideas, please? On Thu, Sep 13, 2018, 3:49 PM Fd Habash wrote: > In API function may invoke 10 queries. Ideally, I would like to know what > queries are invoked by it and how long each took. > > > > I’m using pg_stat_statement. I can see the API function statement, but how > do I deterministi