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       [-d] dbname
32
33       [--dbname] dbname
34              Specifies the name of the database to be reindexed.  If this  is
35              not  specified  and -a (or --all) is not used, the database name
36              is read from the environment variable PGDATABASE. If that is not
37              set, the user name specified for the connection is used.
38
39       -e
40
41       --echo Echo  the  commands  that  reindexdb  generates and sends to the
42              server.
43
44       -i index
45
46       --index index
47              Recreate index only.
48
49       -q
50
51       --quiet
52              Do not display progress messages.
53
54       -s
55
56       --system
57              Reindex database's system catalogs.
58
59       -t table
60
61       --table table
62              Reindex table only.
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       --no-password
88              Never issue a password prompt. If the server  requires  password
89              authentication  and  a  password is not available by other means
90              such as a .pgpass file, the connection attempt will  fail.  This
91              option  can be useful in batch jobs and scripts where no user is
92              present to enter a password.
93
94       -W
95
96       --password
97              Force reindexdb to prompt for a password before connecting to  a
98              database.
99
100              This  option  is never essential, since reindexdb will automati‐
101              cally prompt for a  password  if  the  server  demands  password
102              authentication.   However,  reindexdb  will  waste  a connection
103              attempt finding out that the server wants a password.   In  some
104              cases  it  is  worth  typing  -W  to  avoid the extra connection
105              attempt.
106

ENVIRONMENT

108       PGDATABASE
109
110       PGHOST
111
112       PGPORT
113
114       PGUSER Default connection parameters
115
116       This utility, like most other PostgreSQL utilities, also uses the envi‐
117       ronment variables supported by libpq (see in the documentation).
118

DIAGNOSTICS

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

NOTES

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

EXAMPLES

132       To reindex the database test:
133
134       $ reindexdb test
135
136
137       To reindex the table foo and the index bar in a database named abcd:
138
139       $ reindexdb --table foo --index bar abcd
140
141

SEE ALSO

143       REINDEX [reindex(7)]
144
145
146
147Application                       2011-09-22                      REINDEXDB(1)
Impressum