Re: outdated (bad) information in pg_stat_activity

From: "Gregory S(dot) Williamson" <gsw(at)globexplorer(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: outdated (bad) information in pg_stat_activity
Date: 2005-12-14 22:02:02
Message-ID: 71E37EF6B7DCC1499CEA0316A2568328024BBCCF@loki.wc.globexplorer.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I too have had issues with "stuck" entries in the pg_stat_activity view -- the real pid is long gone but postgres still thinks the process is there.

It would be real sweet to have a way of cleaning this table with bringing postgres off-line.

My $0.02 worth ...

Greg Williamson
DBA
GlobeXplorer LLC

-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org on behalf of Chris Browne
Sent: Wed 12/14/2005 11:06 AM
To: pgsql-general(at)postgresql(dot)org
Cc:
Subject: Re: [GENERAL] outdated (bad) information in pg_stat_activity
depesz(at)gmail(dot)com (hubert depesz lubaczewski) writes:
> On 12/14/05, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>
> hubert depesz lubaczewski <depesz(at)gmail(dot)com> writes:
> > my pg_stat_activity is raporting process working on a query for 12 hours
> > straight! (query_start).
> > 2 problems:
> > 1. this particular query runs typically between 80 and 200 miliseconds!
> > 2. procpid of this backend does not exists anymore in system
> It's possible that the "backend exited" message got dropped by the stats
> mechanism --- the stats code is deliberately designed to lose messages
> rather than delay the rest of the system, so it's not 100% reliable.
>
>
>
> is it possible to "by hand" remove bad entries from this stats?
> depesz

The only answer I have been able to come to is that restarting the
postmaster will clear this all up.

If there is some less intrusive way of accomplishing this, I'd be keen
on hearing about it...
--
"cbbrowne","@","cbbrowne.com"
http://cbbrowne.com/info/nonrdbms.html
"Funny, the only thing that makes me go Keanu about Microsoft is the
fact that they are constantly behind the times and yet claim to be
innovating." -- Steve Lamb <morpheus(at)despair(dot)rpglink(dot)com>

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

!DSPAM:43a07aed148321697067737!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Devrim GUNDUZ 2005-12-14 23:39:01 New RPM sets are available for download
Previous Message Jaime Casanova 2005-12-14 21:18:42 Re: Recuperar Base de datos