Re: More vacuum stats - Mailing list pgsql-hackers

From Tom Lane
Subject Re: More vacuum stats
Date
Msg-id 20630.1282574324@sss.pgh.pa.us
Whole thread Raw
In response to Re: More vacuum stats  (Magnus Hagander <magnus@hagander.net>)
Responses Re: More vacuum stats  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> On Mon, Aug 23, 2010 at 16:28, Greg Smith <greg@2ndquadrant.com> wrote:
>> What I actually want here is for the time that the last table autovacuum
>> started, adding to the finish time currently exposed by pg_stat_user_tables.

> Now, that would be quite useful. That'd require another stats message,
> since we don't send anything on autovacuum start, but I don't think
> the overhead of that is anything we need to worry about - in
> comparison to an actual vacuum...

No, you wouldn't really need an extra message, you could just send both
start and finish times in the completion message.  I'm not sure that
having last start time update before last end time would be a good idea
anyway.

But in any case it's true that an extra message wouldn't be a
significant cost.  What I'd be more concerned about is the stats table
bloat from adding yet another per-table field.  That could be a lot of
space on an installation with lots of tables.

> We could also store last_autovacuum_vacuum_duration - is that better
> or worse than start and end time?

No, I think you want to know the actual time not only the duration.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: More vacuum stats
Next
From: Magnus Hagander
Date:
Subject: Re: More vacuum stats