From: Andrew Dunstan <andrew@dunslane.net>
To: depesz@depesz.com
Cc: Yuri Levinsky <yuril@celltick.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Current query of the PL/pgsql procedure.
Date: Mon, 16 Dec 2013 08:29:27 -0500
Message-ID: <52AF0037.4020909@dunslane.net> (raw)
In-Reply-To: <20131216102619.GA27781@depesz.com>
References: <C9278837BA426D4DBDF8996DB89023260B685B@Cobra.celltick.com>
<20131216102619.GA27781@depesz.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
On 12/16/2013 05:26 AM, hubert depesz lubaczewski wrote:
> 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/
>
Also, the auto-explain module can peer inside functions. See
<http://www.postgresql.org/docs/current/static/auto-explain.html;
cheers
andrew
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
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: andrew@dunslane.net, depesz@depesz.com, yuril@celltick.com
Subject: Re: Current query of the PL/pgsql procedure.
In-Reply-To: <52AF0037.4020909@dunslane.net>
* 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