reindexdb
Rebuild PostgreSQL database indexes
TLDR
Reindex database
SYNOPSIS
reindexdb [-t table] [-i index] [-a] [-s] [options] [database]
DESCRIPTION
reindexdb rebuilds PostgreSQL indexes. It's a wrapper around SQL REINDEX.
Full database reindex rebuilds all indexes. Fixes corruption and reduces bloat.
Table-specific reindex targets problem areas. Faster than full database reindex.
Concurrent mode allows operations during reindex. Indexes remain usable but reindex is slower.
Parallel jobs speed up multi-table reindex. Each table indexed separately.
PARAMETERS
-t, --table NAME
Reindex specific table.-i, --index NAME
Reindex specific index.-a, --all
All databases.-s, --system
System catalogs only.--concurrently
Concurrent reindex.-U, --username USER
Connect as user.-h, --host HOST
Database server.-p, --port PORT
Server port.-j, --jobs N
Parallel jobs.
CAVEATS
Locks tables during non-concurrent reindex. Large indexes take time. Disk space needed.
HISTORY
reindexdb is part of PostgreSQL, providing command-line access to the REINDEX SQL command. It simplifies database maintenance operations.
