Re: clear defunct entries from pg_stat_activity

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: clear defunct entries from pg_stat_activity
Date: 2004-03-14 03:11:03
Message-ID: 4053CD47.1030305@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Robert Treat wrote:

> http://archives.postgresql.org/pgsql-general/2003-11/msg00581.php
>
> In the above Jan Wieck mentions a bug that occurs in pg 7.3.4 that
> causes a crashing backend to hang around in the stats until the slot is
> reused, due to the message that tells that the backend terminates is
> never sent to the collector daemon.
>
> I'm curious if anyone knows if this was fixed in 7.4, and perhaps more
> importantly if there is a way to clear these entries in 7.3.4. (I was
> thinking perhaps some entries in the stats tables but didn't find
> anything...)

Actually, the explanation I gave in there is not entirely correct. A
crashing backend causes the postmaster to restart the whole system and I
think we're restarting the stat collector at the same time as well.

What can happen is that under heavy load, when the stat collector cannot
keep up with the stats thrown at him, the kernel decides to throw away
UDP packets instead (this is by design, so don't try to fix this by
making that communication reliable). And in that case, it won't help the
slightest bit if that message would even be sent by the postmaster.

So I don't even have an idea how that could be fixed.

Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Davis 2004-03-14 03:20:11 Postgres and disk space
Previous Message Tom Lane 2004-03-14 00:52:13 Re: PostgeSQL problem (server crashed?)