Re: Can't we give better table bloat stats easily? - Mailing list pgsql-hackers

From Jeff Janes
Subject Re: Can't we give better table bloat stats easily?
Date
Msg-id CAMkU=1zJ0J3Trmp0wt+vauDD2fpjnnApRS7cDiEm16oFzCrwJQ@mail.gmail.com
Whole thread Raw
In response to Can't we give better table bloat stats easily?  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
On Fri, Aug 16, 2019 at 8:39 PM Greg Stark <stark@mit.edu> wrote:
Everywhere I've worked I've seen people struggle with table bloat. It's hard to even measure how much of it you have or where, let alone actually fix it.

If you search online you'll find dozens of different queries estimating how much empty space are in your tables and indexes based on pg_stats statistics and suppositions about header lengths and padding and plugging them into formulas of varying credibility. 

There is not much we can do to suppress bad advice that people post on their own blogs.  If wiki.postgresql.org is hosting bad advice, by all means we should fix that.
 
But isn't this all just silliiness these days? We could actually sum up the space recorded in the fsm and get a much more trustworthy number in milliseconds. 

If you have bloat problems, then you probably have vacuuming problems.  If you have vacuuming problems, how much can you trust fsm anyway?

Cheers,

Jeff

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: mingw32 floating point diff
Next
From: Ibrar Ahmed
Date:
Subject: Re: pg_upgrade: Error out on too many command-line arguments