vacuumdb.1

来自「PostgreSQL 8.2中增加了很多企业用户所需要的功能和性能上的提高,其开」· 1 代码 · 共 169 行

1
169
字号
.\\" auto-generated by docbook2man-spec $Revision: 1.1.1.1 $.TH "VACUUMDB" "1" "2008-01-03" "Application" "PostgreSQL Client Applications".SH NAMEvacuumdb \- garbage-collect and analyze a PostgreSQL database.SH SYNOPSIS.sp\fBvacuumdb\fR [ \fB\fIconnection-option\fB\fR\fI...\fR ]  [ \fB [ --full ]  [ -f ] \fR ]  [ \fB [ --verbose ]  [ -v ] \fR ]  [ \fB [ --analyze ]  [ -z ] \fR ]  [ \fB--table | -t \fItable\fB [ ( \fIcolumn\fB [,...] ) ] \fR ]  [ \fB\fIdbname\fB\fR ] \fBvacuumdb\fR [ \fB\fIconnection-options\fB\fR\fI...\fR ]  [ \fB [ --all ]  [ -a ] \fR ]  [ \fB [ --full ]  [ -f ] \fR ]  [ \fB [ --verbose ]  [ -v ] \fR ]  [ \fB [ --analyze ]  [ -z ] \fR ] .SH "DESCRIPTION".PP\fBvacuumdb\fR is a utility for cleaning aPostgreSQL database.\fBvacuumdb\fR will also generate internal statisticsused by the PostgreSQL query optimizer..PP\fBvacuumdb\fR is a wrapper around the SQLcommand VACUUM [\fBvacuum\fR(7)].There is no effective difference between vacuuming databases viathis utility and via other methods for accessing the server..SH "OPTIONS".PP\fBvacuumdb\fR accepts the following command-line arguments:.TP\fB-a\fR.TP\fB--all\fRVacuum all databases..TP\fB[-d] \fIdbname\fB\fR.TP\fB[--dbname] \fIdbname\fB\fRSpecifies the name of the database to be cleaned or analyzed.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 \fBvacuumdb\fR generatesand sends to the server..TP\fB-f\fR.TP\fB--full\fRPerform ``full'' vacuuming..TP\fB-q\fR.TP\fB--quiet\fRDo not display a response..TP\fB-t \fItable\fB [ (\fIcolumn\fB [,...]) ]\fR.TP\fB--table \fItable\fB [ (\fIcolumn\fB [,...]) ]\fRClean or analyze \fItable\fR only.Column names may be specified only in conjunction withthe \fB--analyze\fR option..sp.RS.B "Tip:"If you specify columns, you probably have to escape the parenthesesfrom the shell. (See examples below.).RE.sp.TP\fB-v\fR.TP\fB--verbose\fRPrint detailed information during processing..TP\fB-z\fR.TP\fB--analyze\fRCalculate statistics for use by the optimizer..PP.PP\fBvacuumdb\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 serveris running. If the value begins with a slash, it is used as the directory 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 VACUUM [\fBvacuum\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 "NOTES".PP\fBvacuumdb\fR might need to connect severaltimes to the PostgreSQL server, askingfor a password each time. It is convenient to have a\fI~/.pgpass\fR file in such cases. See in the documentation for more information..SH "EXAMPLES".PPTo clean the database test:.sp.nf$ \fBvacuumdb test\fR.sp.fi.PPTo clean and analyze for the optimizer a database namedbigdb:.sp.nf$ \fBvacuumdb --analyze bigdb\fR.sp.fi.PPTo clean a single tablefoo in a database namedxyzzy, and analyze a single columnbar of the table for the optimizer:.sp.nf$ \fBvacuumdb --analyze --verbose --table 'foo(bar)' xyzzy\fR.sp.fi.SH "SEE ALSO"VACUUM [\fBvacuum\fR(7)]

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?