PostgreSQL

REINDEX requires disk space equal to full index size plus overhead

warning
storageUpdated Jul 3, 2025
Technologies:
How to detect:

Rebuilding a corrupted index with REINDEX requires free disk space approximately equal to the current index size. For large indexes (e.g., 4TB+), this can exhaust available disk space if not planned for. The operation builds a new index before dropping the old one.

Recommended action:

Before running REINDEX on large tables, verify available disk space exceeds the index size. Monitor disk utilization during the rebuild. For very large indexes, the rebuild can take many hours or overnight. Plan the maintenance window accordingly and ensure monitoring is in place to detect if the operation fails due to space constraints.