From e44087d827bdfc43c34695325e8a2d43d7eef23e Mon Sep 17 00:00:00 2001 From: "Thomas G. Lockhart" Date: Sat, 14 Nov 1998 02:01:40 +0000 Subject: [PATCH] Add reference page for new vacuumdb utility. --- doc/src/sgml/ref/allfiles.sgml | 1 + doc/src/sgml/ref/commands.sgml | 1 + doc/src/sgml/ref/vacuumdb.sgml | 255 +++++++++++++++++++++++++++++++++ 3 files changed, 257 insertions(+) create mode 100644 doc/src/sgml/ref/vacuumdb.sgml diff --git a/doc/src/sgml/ref/allfiles.sgml b/doc/src/sgml/ref/allfiles.sgml index 37d3d54384..dabbedf5fc 100644 --- a/doc/src/sgml/ref/allfiles.sgml +++ b/doc/src/sgml/ref/allfiles.sgml @@ -121,3 +121,4 @@ + diff --git a/doc/src/sgml/ref/commands.sgml b/doc/src/sgml/ref/commands.sgml index 18830352a1..005dbb4d6a 100644 --- a/doc/src/sgml/ref/commands.sgml +++ b/doc/src/sgml/ref/commands.sgml @@ -101,6 +101,7 @@ This is reference information for the &pgDump; &pgDumpall; &psqlRef; +&vacuumdb; diff --git a/doc/src/sgml/ref/vacuumdb.sgml b/doc/src/sgml/ref/vacuumdb.sgml new file mode 100644 index 0000000000..21bdd13671 --- /dev/null +++ b/doc/src/sgml/ref/vacuumdb.sgml @@ -0,0 +1,255 @@ + + + +vacuumdb + +Application + + + +vacuumdb + + +Clean and analyze a Postgres database + + + +1998-10-04 + + +vacuumdb [ --analyze | -z ] [ --verbose | -v ] [ dbname ] +vacuumdb [ -h host ] [ -p port ] + [ --table 'table [ ( column [,...] ) ]' ] + [ dbname ] + + + + +1998-10-04 + + +Inputs + + +vacuumdb accepts the following command line arguments: + + + + +dbname + + + +Specifies the name of the database to be cleaned or analyzed. +dbname +defaults to the value of the +USER +environment variable. + + + +--analyze + + +-z + + + +Calculate statistics on the database for use by the optimizer. + + + +--verbose + + +-v + + + +Print detailed information during processing. + + + +--table table [ (column [,...]) ] + + +-t table [ (column [,...]) ] + + + +Clean or analyze table only. +Column names may be specified only in conjunction with + the option. + + + + +vacuumdb also accepts +the following command line arguments for connection parameters: + + + + +-h host + + + +Specifies the hostname of the machine on which the +postmaster +is running. Defaults to using a local Unix domain socket + rather than an IP connection.. + + + +-p port + + + +Specifies the Internet TCP/IP port or local Unix domain socket file +extension on which the postmaster +is listening for connections. The port number defaults to 5432, + or the value of the PGPORT +environment variable (if set). + + + +-u + + + +Use password authentication. +Prompts for +username + and password. + + + + + +1998-10-04 + + +Outputs + + +vacuumdb executes a VACUUM command +on the specified database, so has not explicit external output. + + + + +ERROR: Can't vacuum columns, only tables. You can 'vacuum analyze' columns. +vacuumdb: database vacuum failed on dbname. + + +The non-analyze mode requires cleaning full tables or databases. +Individual columns may be specified only when analyzing a specific table. + + + +Connection to database 'template1' failed. +connectDB() failed: Is the postmaster running and accepting connections + at 'UNIX Socket' on port 'port'? + + +vacuumdb could not attach to the +postmaster +process on the specified host and port. If you see this message, +ensure that the postmaster +is running on the proper host and that you have specified the proper +port. If your site uses an authentication system, ensure that you +have obtained the required authentication credentials. + + + +Connection to database 'dbname' failed. +FATAL 1: SetUserId: user 'username' is not in 'pg_shadow' + + +You do not have a valid entry in the relation pg_shadow +and and will not be allowed to access Postgres. +Contact your Postgres administrator. + + + + + +vacuumdb internally executes a +VACUUM SQL statement. +If you have problems running vacuumdb, +make sure you are able to run VACUUM on the database using, for +example, psql. + + + + +1998-10-04 + + +Description + + + +vacuumdb is a utility for cleaning a +Postgres database. +vacuumdb will also generate internal statistics +used by the Postgres query optimizer. + + + +1998-10-04 + + +Notes + + + +See for more details. + + + +1998-10-04 + + +Usage + + +To clean a database of the same name as the user: + + +% vacuumdb + + + +To analyze a database named bigdb for the optimizer: + + +% vacuumdb --analyze bigdb + + + +To analyze a single column bar in table foo + in a database named xyzzy for the optimizer: + + +% vacuumdb --analyze --verbose --table 'foo(bar)' xyzzy + + + + + -- 2.40.0