Re: How to list what queries are running in postgres?

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: How to list what queries are running in postgres?
Date: 2004-06-30 08:43:51
Message-ID: 40E27D47.1000908@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Tom Lane wrote:

> Gaetano Mendola <mendola(at)bigfoot(dot)com> writes:
>
>>P.A.M. van Dam wrote:
>>
>>>I'm looking for a command or method to find out what queries are
>>>currently being serviced by the database.
>
>
>>select * from pg_stat_activity;
>
>
> ... having first remembered to turn on stats_command_string; and
> thou shalt also be superuser.
>
> [ anybody else remember Monty Python's scriptures concerning the
> Holy Hand Grenade? ]

Do you mean this ?

Then did he raise on high the Holy Hand Grenade of Antioch, saying,
"Bless this, O Lord, that with it thou mayst blow thine enemies to
tiny bits, in thy mercy." And the people did rejoice and did feast
upon the lambs and toads and tree-sloths and fruit-bats and orangutans
and breakfast cereals ... Now did the Lord say, "First thou pullest
the Holy Pin. Then thou must count to three. Three shall be the number
of the counting and the number of the counting shall be three. Four
shalt thou not count, neither shalt thou count two, excepting that
thou then proceedeth to three. Five is right out. Once the number
three, being the number of the counting, be reached, then lobbest
thou the Holy Hand Grenade in the direction of thine foe, who, being
naughty in my sight, shall snuff it."

:-)

Regards
Gaetano Mendola

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Doug Quale 2004-06-30 09:03:26 Re: grant execute on many functions
Previous Message Peter Eisentraut 2004-06-30 06:49:18 Re: PITR Error Message assistance