From: Michael Fuhr <mike@fuhr.org>
To: Patrick Hsieh(?????????) <pahudnet@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: how to view running sessions ?
Date: Thu, 17 Feb 2005 18:51:29 -0700
Message-ID: <20050218015128.GA28345@winnie.fuhr.org> (raw)
In-Reply-To: <359737a805021716571fd008b6@mail.gmail.com>
References: <359737a805021716571fd008b6@mail.gmail.com>
On Fri, Feb 18, 2005 at 08:57:00AM +0800, Patrick Hsieh(?????????) wrote:
> Is there any why to see/view the running query sessions in the database?
> Something like "SHOW PROCESSLIST" in MySQL.
SELECT * FROM pg_stat_activity;
If the current_query column says "<command string not enabled>"
then edit postgresql.conf, set "stats_command_string = true" (and
make sure it's uncommented), and restart or reload the backend.
For more information, see the "Monitoring Database Activity" and
"Server Run-time Environment" chapters in the documentation.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: mike@fuhr.org, pahudnet@gmail.com
Subject: Re: how to view running sessions ?
In-Reply-To: <20050218015128.GA28345@winnie.fuhr.org>
References: <359737a805021716571fd008b6@mail.gmail.com> <20050218015128.GA28345@winnie.fuhr.org>
* 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