Re: [SQL] [GENERAL] Monitoring a Query

2002-09-27 Thread Alvaro Herrera
Bruce Momjian dijo: > Roberto Mello wrote: > > Forgive my ignorance here, but what is GUC? And how would I access the > > query duration? > > GUC is postgresql.conf and SET commands. They are variables that can be > set. Just for the record, GUC is an acronym for "Grand Unified Configuration

Re: [SQL] [GENERAL] Monitoring a Query

2002-09-27 Thread Neil Conway
Bruce Momjian <[EMAIL PROTECTED]> writes: > Aaron Held wrote: > > Is there any way to monitor a long running query? > > Oh, sorry, you want to know how far the query has progressed. Gee, I > don't think there is any easy way to do that. Would it be a good idea to add the time that the current q

Re: [SQL] [GENERAL] Monitoring a Query

2002-09-23 Thread Bruce Momjian
Alvaro Herrera wrote: > Bruce Momjian dijo: > > > Roberto Mello wrote: > > > > Forgive my ignorance here, but what is GUC? And how would I access the > > > query duration? > > > > GUC is postgresql.conf and SET commands. They are variables that can be > > set. > > Just for the record, GUC is

Re: [SQL] [GENERAL] Monitoring a Query

2002-09-23 Thread Bruce Momjian
Roberto Mello wrote: > On Mon, Sep 23, 2002 at 10:48:30AM -0400, Bruce Momjian wrote: > > > > > > > > > > Would it be a good idea to add the time that the current query began > > > > > execution at to pg_stat_activity? > > > > > > > > What do people think about this? It seems like a good idea t

Re: [SQL] [GENERAL] Monitoring a Query

2002-09-23 Thread Roberto Mello
On Mon, Sep 23, 2002 at 10:48:30AM -0400, Bruce Momjian wrote: > > > > > > > > Would it be a good idea to add the time that the current query began > > > > execution at to pg_stat_activity? > > > > > > What do people think about this? It seems like a good idea to me. > > > > OpenACS has a pack

Re: [SQL] [GENERAL] Monitoring a Query

2002-09-23 Thread Tom Lane
Manfred Koizar <[EMAIL PROTECTED]> writes: > This has been discussed before and I know I'm going to get flamed for > this, but IMHO having now() (which is a synonym for CURRENT_TIMESTAMP) > return the start time of the current transaction is a bug, or at least > it is not conforming to the standar

Re: [SQL] [GENERAL] Monitoring a Query

2002-09-23 Thread Manfred Koizar
On Mon, 23 Sep 2002 11:06:19 -0400 (EDT), Bruce Momjian <[EMAIL PROTECTED]> wrote: >Tom Lane wrote: >> It would be nearly free to include the start time of the current >> transaction, because we already save that for use by now(). Is >> that good enough, or do we need start time of the current qu

Re: [SQL] [GENERAL] Monitoring a Query

2002-09-23 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > OK, added to TODO: > > * Add start time to pg_stat_activity > > It would be nearly free to include the start time of the current > transaction, because we already save that for use by now(). Is > that good enough, or do we need

Re: [SQL] [GENERAL] Monitoring a Query

2002-09-23 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > OK, added to TODO: > * Add start time to pg_stat_activity It would be nearly free to include the start time of the current transaction, because we already save that for use by now(). Is that good enough, or do we need start time of the current qu

Re: [SQL] [GENERAL] Monitoring a Query

2002-09-23 Thread Bruce Momjian
Aaron Held wrote: > It looks like that just timestamps things in its connection pool, that > is what I do now. > > What I would like is to know about queries that have not finished yet. OK, added to TODO: * Add start time to pg_stat_activity Should we supply the current duration too?

Re: [SQL] [GENERAL] Monitoring a Query

2002-09-23 Thread Bruce Momjian
Roberto Mello wrote: > On Sun, Sep 22, 2002 at 09:51:55PM -0400, Bruce Momjian wrote: > > > > > > Would it be a good idea to add the time that the current query began > > > execution at to pg_stat_activity? > > > > What do people think about this? It seems like a good idea to me. > > OpenACS h

Re: [SQL] [GENERAL] Monitoring a Query

2002-09-23 Thread Aaron Held
It looks like that just timestamps things in its connection pool, that is what I do now. What I would like is to know about queries that have not finished yet. -Aaron Roberto Mello wrote: > On Sun, Sep 22, 2002 at 09:51:55PM -0400, Bruce Momjian wrote: > >>>Would it be a good idea to add the

Re: [SQL] [GENERAL] Monitoring a Query

2002-09-23 Thread Roberto Mello
On Sun, Sep 22, 2002 at 09:51:55PM -0400, Bruce Momjian wrote: > > > > Would it be a good idea to add the time that the current query began > > execution at to pg_stat_activity? > > What do people think about this? It seems like a good idea to me. OpenACS has a package called "Developer Suppor

Re: [SQL] [GENERAL] Monitoring a Query

2002-09-23 Thread Aaron Held
Bruce Momjian wrote: > Neil Conway wrote: > >>Bruce Momjian <[EMAIL PROTECTED]> writes: >> >>>Aaron Held wrote: >>> Is there any way to monitor a long running query? >>> >>>Oh, sorry, you want to know how far the query has progressed. Gee, I >>>don't think there is any easy way to do that. >

Re: [SQL] [GENERAL] Monitoring a Query

2002-09-22 Thread Bruce Momjian
Neil Conway wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Aaron Held wrote: > > > Is there any way to monitor a long running query? > > > > Oh, sorry, you want to know how far the query has progressed. Gee, I > > don't think there is any easy way to do that. > > Would it be a good idea

Re: [SQL] [GENERAL] Monitoring a Query

2002-09-20 Thread Aaron Held
There are some good views and functions you can use to get at the SQL query being executed try turning on the stats collector and running select * from pg_stat_activity; (See http://www.postgresql.org/idocs/index.php?monitoring-stats.html ) You can also see the procID. From Python I can use t

Re: [SQL] [GENERAL] Monitoring a Query

2002-09-20 Thread Bruce Momjian
Uh, no, not yet. There is a non-X version of tcl but I don't think pgaccess will work under that. --- [EMAIL PROTECTED] wrote: > > I just downloaded and installed pgmonitor on my dev. machine after seeing > your post, and

Re: [SQL] [GENERAL] Monitoring a Query

2002-09-20 Thread Bruce Momjian
There is pgmonitor: http://gborg.postgresql.org/project/pgmonitor --- Aaron Held wrote: > Is there any way to monitor a long running query? > > I have stats turned on and I can see my queries, but is there any bet

Re: [SQL] [GENERAL] Monitoring a Query

2002-09-20 Thread Bruce Momjian
Aaron Held wrote: > Is there any way to monitor a long running query? > > I have stats turned on and I can see my queries, but is there any better > measure of the progress? Oh, sorry, you want to know how far the query has progressed. Gee, I don't think there is any easy way to do that. Sorr