Re: which commands under PostgreSQL do the similar func - Mailing list pgsql-general

From Ying Lu
Subject Re: which commands under PostgreSQL do the similar func
Date
Msg-id 42A49188.2080003@cs.concordia.ca
Whole thread Raw
In response to Re: which commands under PostgreSQL do the similar func provided by "show processlist" under mysql  (David Fetter <david@fetter.org>)
List pgsql-general
>>"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;
>
I tried this query. Under column "current_query", I always got: <command
string not enabled> but not the correct queries.

I searched the previous mailing list, it seems that I need also setup
stats_command_string = true in postgresql.conf to see the queries. May I
ask will if arise any performance issues please?

I'd love to get some info about setting up:

stats_block_level = true
stats_row_level = true


Thanks A LOT,
Emi


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump 8.0.3 failing against PostgreSQL 7.3.2
Next
From: Jochem van Dieten
Date:
Subject: Re: pg_dump 8.0.3 failing against PostgreSQL 7.3.2