Rebuilds indexes in a database.
reindexdb [<connection-option> ...] [--table | -t <table> ] [--index | -i <index> ] [<dbname>] reindexdb [<connection-option> ...] --all | -a reindexdb [<connection-option> ...] --system | -s [<dbname>] reindexdb -? | --help reindexdb -V | --version
reindexdb is a utility for rebuilding indexes in Greenplum Database.
reindexdb is a wrapper around the SQL command
REINDEX. There is no effective difference between reindexing databases via this utility and via other methods for accessing the server.
-allis not used, the database name is read from the environment variable
PGDATABASE. If that is not set, the user name specified for the connection is used.
reindexdbgenerates and sends to the server.
reindexdbversion and exit.
reindexdbcommand line arguments, and exit.
PGHOSTor defaults to localhost.
PGPORTor defaults to 5432.
PGUSERor defaults to the current system user name.
.pgpassfile, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.
postgresdatabase will be used, and if that does not exist,
template1will be used.
reindexdb causes locking of system catalog tables, which could affect currently running queries. To avoid disrupting ongoing business operations, schedule the
reindexb operation during a period of low activity.
reindexdb might need to connect several times to the master server, asking for a password each time. It is convenient to have a
~/.pgpass file in such cases.
To reindex the database
To reindex the table
foo and the index
bar in a database named
reindexdb --table foo --index bar abcd