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?