From: Donald Fraser <postgres@kiwi-fraser.net>
To: [ADMIN] <pgsql-admin@postgresql.org>
Subject: Timing problem wtih pg_stat_activity
Date: Wed, 10 Oct 2007 18:12:37 +0100
Message-ID: <001801c80b60$ca464d30$2064a8c0@LISTINGS12> (raw)
PostgreSQL 8.1.9, Linux Redhat ES 4
I am experiencing a timing issue with the following query:
SELECT count(procpid) FROM pg_stat_activity WHERE usename='someuser'
If I execute the above query by the client who is user "someuser" and it is executed immediately after connecting I am getting two different results depending on the speed of the connection. If I connect to the database on a local area network of 100Mb/s and immediately execute the statement, I see the result of 0. If I connect to the same database over a slow connection, for example 115kb/s and immediately execute the statement, I see the result of 1.
Is this normal behaviour?
Regards
Donald Fraser
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: postgres@kiwi-fraser.net
Subject: Re: Timing problem wtih pg_stat_activity
In-Reply-To: <001801c80b60$ca464d30$2064a8c0@LISTINGS12>
* 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