Re: autovacuum "connections" are hidden

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Larry Rosenman <lrosenman(at)pervasive(dot)com>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Casey Duncan <casey(at)pandora(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: autovacuum "connections" are hidden
Date: 2006-05-18 23:20:21
Message-ID: 20060518232021.GA4444@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > The problem is that pgstat_bestart (called in InitPostgres, which
> > autovac calls) deliberately ignores autovacuum, due to not having a
> > client address. We could create a fake client address (which doesn't
> > seem easy to do), or we could change pg_stat_activity to use an OUTER
> > JOIN. Not sure what other options are there.
>
> Seems like the client address should read as NULL. Not sure if that's
> hard or not. Changing the view definition is no fun (at least for an
> 8.1 back-patch) because it'd require initdb.

This seems to work for me. I'd appreciate input, as I'm not sure how
would other archs (or even my own) cope with the zeroed client address
trick (note the memcmp ...)

This is the 8.1 version of the patch; I haven't looked at HEAD yet, but
I think it's slightly different.

(The actual activity reported is a bit bogus ... I'd appreciate
suggestions for better wording. Do I waste cycles in obtaining the
relname? My answer is yes. What if there are multiple rels (a case
currently not exercised)?. Should it explicitly say that it's
autovacuum? My answer is no.)

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Attachment Content-Type Size
activity.patch text/plain 6.8 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-05-18 23:28:50 Re: autovacuum "connections" are hidden
Previous Message Tom Lane 2006-05-18 22:24:55 Re: autovacuum "connections" are hidden

Browse pgsql-hackers by date

  From Date Subject
Next Message Dawid Kuroczko 2006-05-18 23:26:34 Re: [OT] MySQL is bad, but THIS bad?
Previous Message Tom Lane 2006-05-18 22:24:55 Re: autovacuum "connections" are hidden