Skip site navigation (1) Skip section navigation (2)

Stats Collector Oddity

From: Chris Browne <cbbrowne(at)acm(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Stats Collector Oddity
Date: 2006-12-20 16:38:51
Message-ID: 60r6uu1q04.fsf@dba2.int.libertyrms.com (view raw or flat)
Thread:
Lists: pgsql-hackers
We're getting a bit of an anomaly relating to pg_stat_activity...

oxrstld=# SELECT * from pg_stat_activity where current_query <> '<IDLE>';
   datid    | datname | procpid | usesysid | usename | current_query |          query_start          
------------+---------+---------+----------+---------+---------------+-------------------------------
 1347729970 | oxrstld |  893094 |      122 | tldepp  | commit        | 2006-12-16 19:34:08.583978+00
(1 row)
oxrstld=# select version();
                                   version                                    
------------------------------------------------------------------------------
 PostgreSQL 7.4.12 on powerpc-ibm-aix5.3.0.0, compiled by GCC gcc (GCC) 4.0.1
(1 row)

That PID has been dead for several days, but this connection is marked
as being open, still, after lo many days.

This has *traditionally* been a sign that the stats collector has been
clobbered, at which point pg_stat_activity becomes useless.  That's
not the case here; a less restricted query on pg_stat_activity shows
other more recent data that keeps changing, seemingly consistent with
system activity.

I can track most of the lifecycle of that PID; the connection was
established at 2006-12-16 18:46:38, and I see a few errors associated
with the PID (violations of unique constraints; usual business stuff).
I see nothing in the logs at around 19:34 which would suggest a reason
for any strange behaviour.  There are no records about that PID after
19:34...

I'd like to get rid of this entry, if I can; it's blowing up tests
that warn us about elderly transactions, causing a false positive...
-- 
output = reverse("moc.enworbbc" "@" "enworbbc")
http://www3.sympatico.ca/cbbrowne/
Rules  of the  Evil Overlord  #212. "I  will not  send  out battalions
composed wholly of robots or  skeletons against heroes who have qualms
about killing living beings.  <http://www.eviloverlord.com/>

Responses

pgsql-hackers by date

Next:From: Kaare RasmussenDate: 2006-12-20 16:49:15
Subject: Re: Release 8.2.0 done, 8.3 development starts
Previous:From: Andrew DunstanDate: 2006-12-20 16:26:19
Subject: Re: effective_cache_size vs units

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group