Re: Current query of the PL/pgsql procedure.

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: Yuri Levinsky <yuril(at)celltick(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Current query of the PL/pgsql procedure.
Date: 2013-12-16 10:26:19
Message-ID: 20131216102619.GA27781@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Sun, Dec 15, 2013 at 04:18:18PM +0000, Yuri Levinsky wrote:
> Dear ALL,
> I am running PL/pgsql procedure with sql statements that taking a long
> time. I able to see them in the log just after their completion. How
> can I see currently running SQL statement? I am able to see in
> pg_stat_activity only my call to function. Many thanks in advance.

pg_stat_activity and pg logs, can't see what your function does
internally.

What you can do, though, is to add some "RAISE LOG" to the function, so
that it will log its progress.

Check this for example:
http://www.depesz.com/2010/03/18/profiling-stored-proceduresfunctions/

Best regards,

depesz

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Yuri Levinsky 2013-12-16 11:42:30 Re: Current query of the PL/pgsql procedure.
Previous Message Craig James 2013-12-15 18:05:10 Re: Current query of the PL/pgsql procedure.