Open
Description
The postgresql.index_bloat
metric appears to be incorrect for B-tree indexes.
The query currently used to collect this metric assumes that all columns of the table are included in the index, which is not generally true for B-tree indexes. As a result, the bloat estimation is not accurate at all.
The comment above the query references this page: https://wiki.postgresql.org/wiki/Show_database_bloat — which in turn links to a more appropriate query for estimating B-tree index bloat: https://github.com/ioguix/pgsql-bloat-estimation/tree/master/btree
The author of the B-tree bloat estimation query has also written blog posts discussing the differences in estimation methods: https://blog.ioguix.net/tag/bloat/
Metadata
Metadata
Assignees
Labels
No labels