Re: which commands under PostgreSQL do the similar func provided by "show processlist" under mysql

From: David Fetter <david(at)fetter(dot)org>
To: Ying Lu <ying_lu(at)cs(dot)concordia(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: which commands under PostgreSQL do the similar func provided by "show processlist" under mysql
Date: 2005-06-06 17:04:20
Message-ID: 20050606170420.GF30588@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jun 06, 2005 at 11:22:23AM -0400, Ying Lu wrote:
> Greetings,
>
> I have a question about how to see current processes running under
> postgreSQL.
>
> "show processlist" will display DB, command, time, State, etc under MySQL:
>
> | Id | User | Host | db | Command | Time |
> *State * | *Info*
> | 21 | admin | server1:40898 | test | *Query* | 104 |
> Copying to tmp table | INSERT INTO test (SELECT ... ...
>
>
> May I know which commands to display similar current running
> commands/states under PostgreSQL please?

You're looking for something like

SELECT * FROM pg_stat_activity;

Cheers,
D
--
David Fetter david(at)fetter(dot)org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778

Remember to vote!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jochem van Dieten 2005-06-06 17:46:45 Re: pg_dump 8.0.3 failing against PostgreSQL 7.3.2
Previous Message Bruce Momjian 2005-06-06 16:43:41 Re: Logging query plan for queries