Re: What query currently running within function

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Rebecca Clarke <r(dot)clarke83(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: What query currently running within function
Date: 2014-07-22 09:45:19
Message-ID: CAECtzeWKGx5+7sbaczUQ2HdNi1T4ocBHLNZh4oW_dTf+jXxayQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

2014-07-22 11:36 GMT+02:00 Rebecca Clarke <r(dot)clarke83(at)gmail(dot)com>:

> Hi all,
>
> Presently I'm executing a function that runs many queries within it.
>
> select * from _myfunction();
>
> Is there a way to see what query it is up to within the function?
>

Unfortunately, no. Even with the latest release. pg_stat_activity shows you
what the client fires, not what the server does.

> When I do a select of pg_stat_activity it just shows me the _myfunction()
> query.
>
> I'm running postgresql 9.1
>
> Thanks in advance.
>

--
Guillaume.
http://blog.guillaume.lelarge.info
http://www.dalibo.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ramesh T 2014-07-22 10:12:23 Re: Need r_constraint_name
Previous Message Rebecca Clarke 2014-07-22 09:36:34 What query currently running within function