Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id BFB1C9FA397 for ; Wed, 10 Oct 2007 14:45:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 36808-08 for ; Wed, 10 Oct 2007 14:45:27 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail.cisx.com (mail.cisx.com [213.133.202.146]) by postgresql.org (Postfix) with ESMTP id A39F79F9482 for ; Wed, 10 Oct 2007 14:45:26 -0300 (ADT) Received: from LISTINGS12 ([192.168.100.32]) by mail.cisx.com (8.13.1/8.13.1) with SMTP id l9AHCbpj013680 for ; Wed, 10 Oct 2007 18:12:51 +0100 Message-ID: <001801c80b60$ca464d30$2064a8c0@LISTINGS12> From: "Donald Fraser" To: "[ADMIN]" Subject: Timing problem wtih pg_stat_activity Date: Wed, 10 Oct 2007 18:12:37 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0015_01C80B69.234BF030" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Virus-Scanned: ClamAV 0.91.2/4521/Wed Oct 10 08:58:01 2007 on mail.cisx.com X-Virus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.002 tagged_above=0 required=5 tests=BAYES_50=0.001, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200710/83 X-Sequence-Number: 26997 This is a multi-part message in MIME format. ------=_NextPart_000_0015_01C80B69.234BF030 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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=3D'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 ------=_NextPart_000_0015_01C80B69.234BF030 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
PostgreSQL 8.1.9, Linux Redhat ES 4
 
I am experiencing a timing issue with the following=20 query:
SELECT count(procpid) FROM pg_stat_activity WHERE=20 usename=3D'someuser'
 
If I execute the above query by the client = who is=20 user "someuser" and it is executed immediately after connecting I = am=20 getting two different results depending on the speed of the connection.=20 If I connect to the database on a local area = network of=20 100Mb/s and immediately execute the statement, I see the result of=20 0. If I connect to the same database over a slow connection, for=20 example 115kb/s and immediately execute the statement, I see the = result of=20 1.
 
Is this normal behaviour?
 
Regards
Donald Fraser
------=_NextPart_000_0015_01C80B69.234BF030--