From: Jim Buttafuoco <jim@contactbda.com>
To: Erik Wasser <erik.wasser@iquer.net>
To: pgsql-sql@postgresql.org
Subject: Re: 'show full processlist' in postgres?
Date: Fri, 1 Jul 2005 12:24:06 -0400
Message-ID: <20050701162340.M94433@contactbda.com> (raw)
In-Reply-To: <200507011558.46408.erik.wasser@iquer.net>
References: <200507011558.46408.erik.wasser@iquer.net>
did you restart postgresql and use the pg_stat_activity view instead (just to save some typing).
Jim
---------- Original Message -----------
From: Erik Wasser <erik.wasser@iquer.net>
To: pgsql-sql@postgresql.org
Sent: Fri, 1 Jul 2005 15:58:46 +0200
Subject: [SQL] 'show full processlist' in postgres?
> Hallo pgsql-sql@postgresql.org,
>
> I'm looking for a way to display the active querys of postgres. The
> mysql way is a 'show [full] processlist'.
>
> After I've read http://pgsqld.active-venture.com/monitoring-stats.html I
> set STATS_COMMAND_STRING, STATS_BLOCK_LEVEL, STATS_ROW_LEVEL and
> STATS_START_COLLECTOR to 'true'.
>
> Then I executed the query from the bottom of the page:
>
> > SELECT pg_stat_get_backend_pid(S.backendid) AS procpid,
> > pg_stat_get_backend_activity(S.backendid) AS current_query
> > FROM (SELECT pg_stat_get_backend_idset() AS backendid) AS S;
>
> The result was:
>
> procpid | current_query
> ---------+---------------
> 1367 |
> 27387 |
> 930 |
> 28425 | <IDLE>
> (4 rows)
>
> Why there isn't any query in the 'current_query' row? Calling the query
> multiple times just changes the PID (sometimes) but 'current_query' was
> always empty. How do I show up the a list of querys that will be
> processed right in this moment?
>
> P.S: I'm using postgresql 7.4.7 and I was logged I as 'postgres'.
>
> --
> So long... Fuzz
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
------- End of Original Message -------
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-sql@postgresql.org
Cc: jim@contactbda.com, erik.wasser@iquer.net
Subject: Re: 'show full processlist' in postgres?
In-Reply-To: <20050701162340.M94433@contactbda.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