Can't we give better table bloat stats easily?

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Can't we give better table bloat stats easily?
Дата
Msg-id CAM-w4HNWw2qu+7PWCu25L15dswREU0OS1rWi7bHYiT6_zNu9Jg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Can't we give better table bloat stats easily?  (Andres Freund <andres@anarazel.de>)
Re: Can't we give better table bloat stats easily?  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-hackers
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. 

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. 

I rigged up a quick proof of concept and the code seems super simple and quick. There's one or two tables where the number is a bit suspect and there's no fsm if vacuum hasn't run but that seems pretty small potatoes for such a huge help in reducing user pain.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Unused header file inclusion
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Can't we give better table bloat stats easily?