Re: More vacuum stats - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: More vacuum stats
Date
Msg-id AANLkTimi2YWt-Xa4LjxiCPLBN_k4u4=KjQwAft9eysjd@mail.gmail.com
Whole thread Raw
In response to Re: More vacuum stats  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: More vacuum stats  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Aug 23, 2010 at 16:38, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 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.

Hmm, good point. We'd just need an extra field in that message.


> 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.

Well, you could calculate one from the other - especially if one takes
less size, per your comment above.


--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: More vacuum stats
Next
From: Pavel Stehule
Date:
Subject: Re: patch (for 9.1) string functions