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 <ch...@simplistix.co.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@postgresql.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: current_queries.sh
Description: Bourne shell script

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to