.\\" auto-generated by docbook2man-spec $Revision: 1.25 $
.TH "REINDEX" "" "29 March 2001" "SQL - Language Statements" "SQL Commands"
.SH NAME
REINDEX \- Recover corrupted system indexes under stand-alone Postgres
.SH SYNOPSIS
.sp
.nf
REINDEX { TABLE | DATABASE | INDEX } \fIname\fR [ FORCE ]
  
.sp
.fi
.SS "INPUTS"
.PP
.TP
\fBTABLE\fR
Recreate all indexes of a specified table.
.TP
\fBDATABASE\fR
Recreate all system indexes of a specified database.
.TP
\fBINDEX\fR
Recreate a specified index.
.TP
\fB\fIname\fB\fR
The name of the specific table/database/index to be be reindexed.
.TP
\fBFORCE\fR
Recreate indexes forcedly. Without this keyword REINDEX does
nothing unless target indexes are invalidated.
.PP
.SS "OUTPUTS"
.PP
.TP
\fBREINDEX\fR
Message returned if the table is successfully reindexed.
.PP
.SH "DESCRIPTION"
.PP
\fBREINDEX\fR is used to recover corrupted system indexes.
In order to run REINDEX command, postmaster must be shut down and 
stand-alone Postgres should be started instead with options -O and
-P (an option to ignore system indexes). Note that we couldn't rely
on system indexes for the recovery of system indexes.
.SH "USAGE"
.PP
Recreate the table mytable:
.sp
.nf
     REINDEX TABLE mytable;
   
.sp
.fi
.PP
Some more examples:
.sp
.nf
REINDEX DATABASE my_database FORCE;
REINDEX INDEX my_index;
   
.sp
.fi
.SH "COMPATIBILITY"
.SS "SQL92"
.PP
There is no \fBREINDEX\fR in SQL92.
