Skip site navigation (1) Skip section navigation (2)

Re: see all queries incoming

From: Kretschmer Andreas <andreas_kretschmer(at)despammed(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: see all queries incoming
Date: 2005-08-28 13:35:31
Message-ID: 20050828133531.GB1709@kaufbach.delug.de (view raw or flat)
Thread:
Lists: pgsql-novice
Michael Fuhr <mike(at)fuhr(dot)org> schrieb:

> On Sun, Aug 28, 2005 at 02:37:00PM +0200, Kretschmer Andreas wrote:
> > Flávio Brito <flavio(at)gral(dot)org(dot)br> schrieb:
> > > How can I see, such as MSSQL screen, all queries that are processing in real
> > > time?
> > > 
> > > I want to monitor all the queries that are being processed by a user in real
> > > time.
> > 
> > watch "echo \"SELECT * FROM pg_stat_activity;\" | psql -U <user> <db>
> 
> Does that actually work on your system?  On the system I tested it

Yes, Debian/Stable with 8.0.3


> Additionally, periodically doing "SELECT * FROM pg_stat_activity"
> isn't a reliable way to see *all* queries, as you'll miss queries

Yupp, correct. PG ist very fast ;-)


Regards, Andreas
-- 
Diese Message wurde erstellt mit freundlicher Unterstützung eines freilau-
fenden Pinguins aus artgerechter Freilandhaltung.   Er ist garantiert frei
von Micro$oft'schen Viren. (#97922 http://counter.li.org)     GPG 7F4584DA
Was, Sie wissen nicht, wo Kaufbach ist? Hier: N 51.05082°, E 13.56889° ;-)

In response to

pgsql-novice by date

Next:From: Flávio BritoDate: 2005-08-28 13:45:48
Subject: Re: see all queries incoming
Previous:From: Michael FuhrDate: 2005-08-28 13:19:23
Subject: Re: see all queries incoming

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group