Embed Notice
HTML Code
Corresponding Notice
- Embed this notice@michael The indexes are not the primary bloat being solved with pg_repack, it's the tables. The indexes can always be rebuilt in place efficiently with
REINDEX database_name CONCURRENTLY;
pg_repack's main benefit is to rewrite the tables without the holes in them. Databases don't shrink the tablespace files as all those types of operations would be prohibitively expensive. Instead when you delete data it just leaves a hole in the file for it to maybe be reused later. The specifics here we not important, but this is the general idea.
All RDBMS work this way, really.