@@ -146,22 +146,23 @@ using cluster indexes. Only one option can be specified. You may also specify
146
146
target tables or databases.
147
147
148
148
``-n ``, ``--no-order ``
149
- Do online VACUUM FULL.
149
+ Perform an online VACUUM FULL.
150
150
151
151
``-o COLUMNS [,...] ``, ``--order-by=COLUMNS [,...] ``
152
- Do online CLUSTER ordered by specified columns.
152
+ Perform an online CLUSTER ordered by the specified columns.
153
153
154
154
``-t TABLE ``, ``--table=TABLE ``
155
- Reorganize table only. If you don't specify this option , all tables in
156
- specified databases are reorganized.
155
+ Reorganize the specified table only. By default , all eligible tables in
156
+ the target databases are reorganized.
157
157
158
158
``-T SECS ``, ``--wait-timeout=SECS ``
159
159
pg_repack needs to take an exclusive lock at the end of the
160
- reorganization. This setting controls how long it wait for acquiring the
161
- lock in seconds. If the lock cannot be taken even after the duration,
162
- pg_repack forces to cancel conflicted queries. Also, if the server version
163
- is 8.4 or newer, pg_repack forces to disconnect conflicted backends after
164
- twice time passed. The default is 60 seconds.
160
+ reorganization. This setting controls how many seconds pg_repack will
161
+ wait to acquite this lock. If the lock cannot be taken after this duration,
162
+ pg_repack will forcibly cancel the conflicting queries. If you are using
163
+ PostgreSQL version 8.4 or newer, pg_repack will fall back to using
164
+ pg_terminate_backend() to disconnect any remaining backends after
165
+ twice this timeout has passed. The default is 60 seconds.
165
166
166
167
``-Z ``, ``--no-analyze ``
167
168
Disable ANALYZE after the reorganization. If not specified, run ANALYZE
@@ -246,12 +247,12 @@ Examples
246
247
--------
247
248
248
249
Execute the following command to perform an online CLUSTER of all tables in
249
- test database::
250
+ database `` test `` ::
250
251
251
252
$ pg_repack test
252
253
253
- Execute the following command to perform an online VACUUM FULL to foo table in
254
- test database::
254
+ Execute the following command to perform an online VACUUM FULL of table
255
+ `` foo `` in database `` test `` ::
255
256
256
257
$ pg_repack --no-order --table foo -d test
257
258
@@ -270,16 +271,16 @@ version load the script ``$SHAREDIR/contrib/uninstall_pg_repack.sql`` into the
270
271
database where the error occured and then load
271
272
``$SHAREDIR/contrib/pg_repack.sql `` again.
272
273
273
- pg_repack: reorg database "template1" ... skipped: pg_repack is not installed in the database
274
+ pg_repack: repack database "template1" ... skipped: pg_repack is not installed in the database
274
275
pg_repack is not installed in the database when ``--all `` option is
275
276
specified.
276
277
277
- Do register pg_repack to the database.
278
+ Create the pg_repack extension in the database.
278
279
279
280
ERROR: pg_repack is not installed
280
281
pg_repack is not installed in the database specified by ``--dbname ``.
281
282
282
- Do register pg_repack to the database.
283
+ Create the pg_repack extension in the database.
283
284
284
285
ERROR: program 'pg_repack V1' does not match database library 'pg_repack V2'
285
286
There is a mismatch between the ``pg_repack `` binary and the database
@@ -297,15 +298,17 @@ ERROR: extension 'pg_repack V1' required, found extension 'pg_repack V2'
297
298
You should drop the extension from the database and reload it as described
298
299
in the installation _ section.
299
300
300
- ERROR: relation "table" has no primary key
301
- The target table doesn't have PRIMARY KEY.
301
+ ERROR: relation "table" must have a primary key or not-null unique keys
302
+ The target table doesn't have a PRIMARY KEY or any UNIQUE constraints
303
+ defined.
302
304
303
- Define PRIMARY KEY to the table. (ALTER TABLE ADD PRIMARY KEY)
305
+ Define a PRIMARY KEY or a UNIQUE constraint on the table.
304
306
305
307
ERROR: relation "table" has no cluster key
306
308
The target table doesn't have CLUSTER KEY.
307
309
308
- Define CLUSTER KEY to the table. (ALTER TABLE CLUSTER)
310
+ Define a CLUSTER KEY on the table, via ALTER TABLE CLUSTER ON, or use
311
+ one of the --no-order or --order-by modes.
309
312
310
313
pg_repack: query failed: ERROR: column "col" does not exist
311
314
The target table doesn't have columns specified by ``--order-by `` option.
@@ -315,15 +318,15 @@ pg_repack: query failed: ERROR: column "col" does not exist
315
318
ERROR: permission denied for schema repack
316
319
Permission error.
317
320
318
- pg_repack must be executed by superusers .
321
+ pg_repack must be executed by a superuser .
319
322
320
323
pg_repack: query failed: ERROR: trigger "z_repack_trigger" for relation "tbl" already exists
321
324
The target table already has a trigger named ``z_repack_trigger ``.
322
325
323
326
Delete or rename the trigger.
324
327
325
328
pg_repack: trigger conflicted for tbl
326
- The target table already has a trigger which follows by
329
+ The target table already has a trigger which follows
327
330
``z_repack_trigger `` in alphabetical order.
328
331
329
332
Delete or rename the trigger.
@@ -348,7 +351,8 @@ pg_repack cannot reorganize tables using GiST indexes.
348
351
DDL commands
349
352
^^^^^^^^^^^^
350
353
351
- You cannot do DDL commands **except ** VACUUM and ANALYZE during pg_repack. In many
354
+ You cannot perform DDL commands of the target table(s) **except ** VACUUM and
355
+ ANALYZE during pg_repack. In many
352
356
cases pg_repack will fail and rollback correctly, but there are some cases
353
357
which may result in data corruption.
354
358
0 commit comments