Question: Does pg_repack repack indexes when repacking table
bagafoot opened this issue · comments
Hello,
For instance when runs below comand, does it repacking indexes?
/usr/pgsql-12/bin/pg_repack --no-kill-backend -d testdb --table test_table
Yes. Indexes in postgresql point to a specific TID, which includes the block number in the table files. Therefore, we do not have the opportunity to rewrite the contents of the table, but not to touch the indexes. It is possible to rebuild an index without rewriting the table, but rewriting a table always rebuilds all indexes.
@Melkij thanks a lot, that is very clear