1REINDEXDB(1)            PostgreSQL Client Applications            REINDEXDB(1)
2
3
4

NAME

6       reindexdb - reindex a PostgreSQL database
7
8

SYNOPSIS

10       reindexdb  [ connection-option... ]  [ --table | -t table  ]  [ --index
11       | -i index  ]  [ dbname ]
12
13       reindexdb [ connection-option... ]  [ --all | -a ]
14
15       reindexdb [ connection-option... ]  [ --system | -s ]  [ dbname ]
16

DESCRIPTION

18       reindexdb is a utility for rebuilding indexes in a PostgreSQL database.
19
20       reindexdb is a wrapper around the  SQL  command  REINDEX  [reindex(7)].
21       There  is no effective difference between reindexing databases via this
22       utility and via other methods for accessing the server.
23

OPTIONS

25       reindexdb accepts the following command-line arguments:
26
27       -a
28
29       --all  Reindex all databases.
30
31       -s
32
33       --system
34              Reindex database's system catalogs.
35
36       -t table
37
38       --table table
39              Reindex table only.
40
41       -i index
42
43       --index index
44              Recreate index only.
45
46       [-d] dbname
47
48       [--dbname] dbname
49              Specifies the name of the database to be reindexed.  If this  is
50              not  specified  and -a (or --all) is not used, the database name
51              is read from the environment variable PGDATABASE. If that is not
52              set, the user name specified for the connection is used.
53
54       -e
55
56       --echo Echo  the  commands  that  reindexdb  generates and sends to the
57              server.
58
59       -q
60
61       --quiet
62              Do not display a response.
63
64       reindexdb also accepts the following command-line arguments for connec‐
65       tion parameters:
66
67       -h host
68
69       --host host
70              Specifies  the  host  name of the machine on which the server is
71              running. If the value begins with a slash, it  is  used  as  the
72              directory for the Unix domain socket.
73
74       -p port
75
76       --port port
77              Specifies  the  TCP port or local Unix domain socket file exten‐
78              sion on which the server is listening for connections.
79
80       -U username
81
82       --username username
83              User name to connect as.
84
85       -W
86
87       --password
88              Force password prompt.
89

ENVIRONMENT

91       PGDATABASE
92
93       PGHOST
94
95       PGPORT
96
97       PGUSER Default connection parameters
98
99       This utility, like most other PostgreSQL utilities, also uses the envi‐
100       ronment variables supported by libpq (see in the documentation).
101

DIAGNOSTICS

103       In case of difficulty, see REINDEX [reindex(7)] and psql(1) for discus‐
104       sions of potential problems and error messages.   The  database  server
105       must be running at the targeted host. Also, any default connection set‐
106       tings and environment variables used by  the  libpq  front-end  library
107       will apply.
108

NOTES

110       reindexdb might need to connect several times to the PostgreSQL server,
111       asking for a password each time. It is convenient to have  a  ~/.pgpass
112       file in such cases. See in the documentation for more information.
113

EXAMPLES

115       To reindex the database test:
116
117       $ reindexdb test
118
119
120       To reindex the table foo and the index bar in a database named abcd:
121
122       $ reindexdb --table foo --index bar abcd
123
124

SEE ALSO

126       REINDEX [reindex(7)]
127
128
129
130Application                       2008-06-08                      REINDEXDB(1)
Impressum