pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.com>
To: 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 11:26:19 +0100
Message-ID: <20131216102619.GA27781@depesz.com> (raw)
In-Reply-To: <C9278837BA426D4DBDF8996DB89023260B685B@Cobra.celltick.com>
References: <C9278837BA426D4DBDF8996DB89023260B685B@Cobra.celltick.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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

Attachments:

  signature.asc (application/pgp-signature, 800B) download

view thread (7+ messages)  latest in thread

Message-ID: <20131216102619.GA27781@depesz.com>
Permalink:  ../20131216102619.GA27781@depesz.com/
Also on:    postgresql.org/message-id/20131216102619.GA27781@depesz.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: depesz@depesz.com, yuril@celltick.com
  Subject: Re: Current query of the PL/pgsql procedure.
  In-Reply-To: <20131216102619.GA27781@depesz.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