postgres table and index bloat - ghdrako/doc_snipets GitHub Wiki
- https://github.com/ioguix/pgsql-bloat-estimation/blob/master/table/table_bloat.sql
- https://github.com/ioguix/pgsql-bloat-estimation/blob/master/btree/btree_bloat.sql
- https://github.com/reorg/pg_repack
- https://hakibenita.com/postgresql-unused-index-size
pgcompacttable
- https://github.com/dataegret/pgcompacttable It works by reordering tuples from the end of a table towards the front of a table, which allows the table size to shrink.