REINDEX { TABLE | DATABASE | INDEX } name [ FORCE ]
Pass this parameter to specify that you want to rebuild the indexes of a specified table.
Pass this parameter to rebuild all system indexes for a specified database.
Pass this parameter to rebuild a specified index.
Use this parameter to specify the name of the object you wish to reindex.
Pass this parameter to force the rebuilding of an index. If this parameter is not given, the REINDEX command will only rebuild invalidated indexes.
Use the REINDEX command to rebuild any indexes that become corrupt or invalidated. This is especially useful if the system indexes become corrupted. To fix them, shutdown postmaster and start a standalone database server by restarting it with the -O and -P command line options. This opens a standalone server that ignores all system indexes. Run the REINDEX command once you are at the PostgreSQL prompt.