pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yuri Levinsky <yuril@celltick.com>
To: depesz@depesz.com <depesz@depesz.com>
To: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Cc: Craig James <cjames@emolecules.com>
Subject: Re: Current query of the PL/pgsql procedure.
Date: Mon, 16 Dec 2013 11:42:30 +0000
Message-ID: <C9278837BA426D4DBDF8996DB89023260B79A7@Cobra.celltick.com> (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>

 Dear Depesz,
This is very problematic solution: I have to change whole!!! my code to put appropriate comment with query text before any query execution. In addition I would like to know current execution plan, that seems to be impossible. This is very hard limitation let's say. In case of production issue I'll just unable to do it: the issue already happening, I can't stop procedure and start code change.
James,
I saw your reply: I see the function is running, it's just not clear that exactly and how this function doing. 

Sincerely yours,


Yuri Levinsky, DBA
Celltick Technologies Ltd., 32 Maskit St., Herzliya 46733, Israel
Mobile: +972 54 6107703, Office: +972 9 9710239; Fax: +972 9 9710222

-----Original Message-----
From: depesz@depesz.com [mailto:depesz@depesz.com] 
Sent: Monday, December 16, 2013 12:26 PM
To: Yuri Levinsky
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] Current query of the PL/pgsql procedure.

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


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


view thread (7+ messages)  latest in thread

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