pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fred Habash <fmhabash@gmail.com>
To: Patrick Molgaard <draaglom@gmail.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: How Do You Associate a Query With its Invoking Procedure?
Date: Sun, 16 Sep 2018 17:53:58 -0400
Message-ID: <E96A3EB0-1CFD-464C-9ED5-CC6F90C82DD6@gmail.com> (raw)
In-Reply-To: <CA+Zan4uSxucb2E5hZXqXXkfAL2-ZDttdb6sRJU4zdR2KimfvHA@mail.gmail.com>
References: <5b9abf54.1c69fb81.8e0e4.9e2d@mx.google.com>
	<CADpeV5xXCfvkc5acofF-_MTD5T=b=xYS3Wi1Dayys_XsaO+25w@mail.gmail.com>
	<CA+Zan4uSxucb2E5hZXqXXkfAL2-ZDttdb6sRJU4zdR2KimfvHA@mail.gmail.com>

All great ideas.

I was thinking something similar to some other RDBMS engines where SQL is automatically tied to the invoking PROGRAM_ID  with zero setup on the client side. I thought there could be something similar in PG somewhere in the catalog. 

As always, great support. This level of support helps a lot in our migration to Postgres. 

————-
Thank you. 

> On Sep 15, 2018, at 5:24 AM, Patrick Molgaard <draaglom@gmail.com> wrote:
> 
> You might find application-level tracing a more practical answer - e.g. check out Datadog APM for a (commercial) plug and play approach or Jaeger for a self-hostable option.
> 
> Patrick
>> On Fri, Sep 14, 2018 at 4:38 PM Fred Habash <fmhabash@gmail.com> wrote:
>> Any ideas, please? 
>> 
>>> On Thu, Sep 13, 2018, 3:49 PM Fd Habash <fmhabash@gmail.com> 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 all queries invoked by it?
>>> 
>>>  
>>> 
>>>  
>>> 
>>> ----------------
>>> Thank you
>>> 
>>>  

view thread (7+ messages)

Message-ID: <E96A3EB0-1CFD-464C-9ED5-CC6F90C82DD6@gmail.com>
Permalink:  ../E96A3EB0-1CFD-464C-9ED5-CC6F90C82DD6@gmail.com/
Also on:    postgresql.org/message-id/E96A3EB0-1CFD-464C-9ED5-CC6F90C82DD6@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: fmhabash@gmail.com, draaglom@gmail.com, pgsql-performance@lists.postgresql.org
  Subject: Re: How Do You Associate a Query With its Invoking Procedure?
  In-Reply-To: <E96A3EB0-1CFD-464C-9ED5-CC6F90C82DD6@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox