Re: Additional stats for Relations - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Re: Additional stats for Relations
Date
Msg-id 20061019150838.GS71084@nasby.net
Whole thread Raw
In response to Re: Additional stats for Relations  (NikhilS <nikkhils@gmail.com>)
Responses Re: Additional stats for Relations  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Oct 19, 2006 at 04:10:46PM +0530, NikhilS wrote:
> Hi Jim,
> 
> On 10/18/06, Jim C. Nasby <jim@nasby.net> wrote:
> >
> >Also how many times a relation has been vacuumed (which puts all the
> >other numbers in more perspective... good catch Simon). And I think
> >number of pages that could not be added to the FSM would also be
> >extremely valuable.
> 
> 
> By the above, do you mean the number of pages that could not be added to the
> FSM because they had freespace which was less than the threshold for this
> particular relation?

Yes... but... :)

We want to ignore pages that have less than the average request size,
because vacuum will never try and put them in the FSM anyway. We only
care about pages that were dropped because MaxFSMPages was less than
DesiredFSMPages (see freespace.c for more info).

It would also be useful to keep track of what relations have been bumped
out of the FSM (or never got recorded, though I'm not sure if that's
possible) because we've run into the MaxFSMRelations limit.

BTW, if we add these counters we'll be up to 7 stats dealing with vacuum
and analyze, and NikhilS has a patch we're finalizing that would add 3
more. Right now there's 4 slated to go into pg_stat_* in 8.2, but maybe
we should have a separate view for vacuum/FSM statistics?
-- 
Jim Nasby                                            jim@nasby.net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Statements with syntax errors are not logged
Next
From: tomas@tuxteam.de
Date:
Subject: Re: Statements with syntax errors are not logged