📄 clusterdb.1
字号:
.\\" auto-generated by docbook2man-spec $Revision: 1.1.1.1 $.TH "CLUSTERDB" "1" "2008-01-03" "Application" "PostgreSQL Client Applications".SH NAMEclusterdb \- cluster a PostgreSQL database.SH SYNOPSIS.sp\fBclusterdb\fR [ \fB\fIconnection-option\fB\fR\fI...\fR ] [ \fB--table | -t \fItable\fB \fR ] [ \fB\fIdbname\fB\fR ] \fBclusterdb\fR [ \fB\fIconnection-option\fB\fR\fI...\fR ] [ \fB [ --all ] [ -a ] \fR ] .SH "DESCRIPTION".PP\fBclusterdb\fR is a utility for reclustering tablesin a PostgreSQL database. It finds tablesthat have previously been clustered, and clusters them again on the sameindex that was last used. Tables that have never been clustered are notaffected..PP\fBclusterdb\fR is a wrapper around the SQLcommand CLUSTER [\fBcluster\fR(7)].There is no effective difference between clustering databases viathis utility and via other methods for accessing the server..SH "OPTIONS".PP\fBclusterdb\fR accepts the following command-line arguments:.TP\fB-a\fR.TP\fB--all\fRCluster all databases..TP\fB[-d] \fIdbname\fB\fR.TP\fB[--dbname] \fIdbname\fB\fRSpecifies the name of the database to be clustered.If this is not specified and \fB-a\fR (or\fB--all\fR) is not used, the database name is readfrom the environment variable \fBPGDATABASE\fR. Ifthat is not set, the user name specified for the connection isused..TP\fB-e\fR.TP\fB--echo\fREcho the commands that \fBclusterdb\fR generatesand sends to the server..TP\fB-q\fR.TP\fB--quiet\fRDo not display a response..TP\fB-t \fItable\fB\fR.TP\fB--table \fItable\fB\fRCluster \fItable\fR only..PP.PP\fBclusterdb\fR also accepts the following command-line arguments for connection parameters:.TP\fB-h \fIhost\fB\fR.TP\fB--host \fIhost\fB\fRSpecifies the host name of the machine on which the server isrunning. If the value begins with a slash, it is used as thedirectory for the Unix domain socket..TP\fB-p \fIport\fB\fR.TP\fB--port \fIport\fB\fRSpecifies the TCP port or local Unix domain socket file extension on which the serveris listening for connections..TP\fB-U \fIusername\fB\fR.TP\fB--username \fIusername\fB\fRUser name to connect as..TP\fB-W\fR.TP\fB--password\fRForce password prompt..PP.SH "ENVIRONMENT".TP\fBPGDATABASE\fR.TP\fBPGHOST\fR.TP\fBPGPORT\fR.TP\fBPGUSER\fRDefault connection parameters.PPThis utility, like most other PostgreSQL utilities,also uses the environment variables supported by \fBlibpq\fR(see in the documentation)..PP.SH "DIAGNOSTICS".PPIn case of difficulty, see CLUSTER [\fBcluster\fR(7)] and \fBpsql\fR(1) fordiscussions of potential problems and error messages.The database server must be running at thetargeted host. Also, any default connection settings and environmentvariables used by the \fBlibpq\fR front-endlibrary will apply..SH "EXAMPLES".PPTo cluster the database test:.sp.nf$ \fBclusterdb test\fR.sp.fi.PPTo cluster a single tablefoo in a database namedxyzzy:.sp.nf$ \fBclusterdb --table foo xyzzy\fR.sp.fi.SH "SEE ALSO"CLUSTER [\fBcluster\fR(7)]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -