From: | Melvin Davidson <melvin6925(at)gmail(dot)com> |
---|---|
To: | Chris Withers <chris(at)simplistix(dot)co(dot)uk> |
Cc: | paramjib baruah <paramjibbaruah(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: current_query='IDLE" in pg_stat_activity |
Date: | 2015-11-23 13:46:53 |
Message-ID: | CANu8Fiy_VVq4DU95Q5aUkRuuspHSR8MWwDeceV09ch5cbxj3_w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
You have not specified your O/S or PostgreSQL version, but if you are
running on a Linux O/S, you can run the attached current_queries.sh, which
loops every 5 seconds by default.
Note the usage options below:
usage() {
echo "Usage: $0 [-s <sleeptime> -d <dbname> -h <host> -U <user> -p
<port> -x -i]"
echo "-x will exit after 1 iteration"
echo "-i will exclude <IDLE> queries"
exit 1
}
On Mon, Nov 23, 2015 at 5:42 AM, Chris Withers <chris(at)simplistix(dot)co(dot)uk>
wrote:
>
> On 23/11/2015 10:33, paramjib baruah wrote:
>
>> I am trying to check current running sql queries in postgres through
>> pg_stat_activity .However, in the current_query column I could see only
>> "IDLE" . I am not able to see the query .
>>
> That would suggest no query is running, what suggests to you that there
> are queries you should be expecting to see?
>
> cheers,
>
> Chris
>
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.
Attachment | Content-Type | Size |
---|---|---|
current_queries.sh | application/x-sh | 2.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2015-11-23 15:30:15 | Re: ??: postgres cpu 100% need help |
Previous Message | Ladislav Lenart | 2015-11-23 12:12:27 | Re: using a postgres table as a multi-writer multi-updater queue |