Skip site navigation (1) Skip section navigation (2)

How to monitor the progress of a stored procedure?

From: "Kynn Jones" <kynnjo(at)gmail(dot)com>
To: "pgsql-general General" <pgsql-general(at)postgresql(dot)org>
Subject: How to monitor the progress of a stored procedure?
Date: 2008-02-27 23:25:40
Message-ID: c2350ba40802271525l470cbacl81b25a8355877be2@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
(Sorry for asking so many questions!)
What techniques can one use to monitor the progress of a stored procedure?

Specifically, how can I get the procedure to print a progress indicator
message to the screen every once in a while?

I have a stored procedure that has been running for a very long time.
 Before doing the current "real" run, I tested the procedure on a toy case
and confirmed that it produced the right result.  So I know that when it
finishes it will be OK, but I can't tell whether it will finish in an hour
or in a century...  I have no idea of how far along it is.  (In case it
matters, the procedure is written in PL/perl.  I tried to use Perl's print
statement, unbuffered, to print out a message periodically from within the
procedure, but I see no output.)

Thanks in advance,

Kynn

Responses

pgsql-general by date

Next:From: Erik JonesDate: 2008-02-27 23:37:25
Subject: Re: How to monitor the progress of a stored procedure?
Previous:From: Greg SmithDate: 2008-02-27 22:29:08
Subject: Re: RHEL3 configure ssl

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group