Re: a fast bloat measurement tool (was Re: Measuring relation free space) - Mailing list pgsql-hackers

From Abhijit Menon-Sen
Subject Re: a fast bloat measurement tool (was Re: Measuring relation free space)
Date
Msg-id 20150511191214.GA6741@toroid.org
Whole thread Raw
In response to Re: a fast bloat measurement tool (was Re: Measuring relation free space)  (Andres Freund <andres@anarazel.de>)
Responses Re: a fast bloat measurement tool (was Re: Measuring relation free space)  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
At 2015-05-11 19:15:47 +0200, andres@anarazel.de wrote:
>
> TBH, I'd rather not touch unrelated things right now. We're pretty
> badly behind...

OK. That patch is independent; just ignore it.

> I don't really care how it's named, as long as it makes clear that
> it's not an exact measurement.

Not having heard any better suggestions, I picked "pgstatapprox" as a
compromise between length and familiarity/consistency with pgstattuple.

> > Should I count the space it would have free if it were initialised,
> > but leave the page alone for VACUUM to deal with?

And this is what the attached patch does.

I also cleaned up a few things that I didn't like but had left alone to
make the code look similar to pgstattuple. In particular, build_tuple()
now does nothing but build a tuple from values calculated earlier in
pgstatapprox_heap().

Thank you.

-- Abhijit

P.S. What, if anything, should be done about the complicated and likely
not very useful skip-only-min#-blocks logic in lazy_scan_heap?

Attachment

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: LOCK TABLE Permissions
Next
From: Peter Geoghegan
Date:
Subject: Re: [BUGS] BUG #13148: Unexpected deferred EXCLUDE constraint violation on derived table