Skip to content

Commit c756d13

Browse files
committed
Docs cleanup by Josh
1 parent 520870c commit c756d13

File tree

1 file changed

+26
-22
lines changed

1 file changed

+26
-22
lines changed

doc/pg_repack.rst

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -146,22 +146,23 @@ using cluster indexes. Only one option can be specified. You may also specify
146146
target tables or databases.
147147

148148
``-n``, ``--no-order``
149-
Do online VACUUM FULL.
149+
Perform an online VACUUM FULL.
150150

151151
``-o COLUMNS [,...]``, ``--order-by=COLUMNS [,...]``
152-
Do online CLUSTER ordered by specified columns.
152+
Perform an online CLUSTER ordered by the specified columns.
153153

154154
``-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.
157157

158158
``-T SECS``, ``--wait-timeout=SECS``
159159
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.
165166

166167
``-Z``, ``--no-analyze``
167168
Disable ANALYZE after the reorganization. If not specified, run ANALYZE
@@ -246,12 +247,12 @@ Examples
246247
--------
247248

248249
Execute the following command to perform an online CLUSTER of all tables in
249-
test database::
250+
database ``test``::
250251

251252
$ pg_repack test
252253

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``::
255256

256257
$ pg_repack --no-order --table foo -d test
257258

@@ -270,16 +271,16 @@ version load the script ``$SHAREDIR/contrib/uninstall_pg_repack.sql`` into the
270271
database where the error occured and then load
271272
``$SHAREDIR/contrib/pg_repack.sql`` again.
272273

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
274275
pg_repack is not installed in the database when ``--all`` option is
275276
specified.
276277

277-
Do register pg_repack to the database.
278+
Create the pg_repack extension in the database.
278279

279280
ERROR: pg_repack is not installed
280281
pg_repack is not installed in the database specified by ``--dbname``.
281282

282-
Do register pg_repack to the database.
283+
Create the pg_repack extension in the database.
283284

284285
ERROR: program 'pg_repack V1' does not match database library 'pg_repack V2'
285286
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'
297298
You should drop the extension from the database and reload it as described
298299
in the installation_ section.
299300

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.
302304

303-
Define PRIMARY KEY to the table. (ALTER TABLE ADD PRIMARY KEY)
305+
Define a PRIMARY KEY or a UNIQUE constraint on the table.
304306

305307
ERROR: relation "table" has no cluster key
306308
The target table doesn't have CLUSTER KEY.
307309

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.
309312

310313
pg_repack: query failed: ERROR: column "col" does not exist
311314
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
315318
ERROR: permission denied for schema repack
316319
Permission error.
317320

318-
pg_repack must be executed by superusers.
321+
pg_repack must be executed by a superuser.
319322

320323
pg_repack: query failed: ERROR: trigger "z_repack_trigger" for relation "tbl" already exists
321324
The target table already has a trigger named ``z_repack_trigger``.
322325

323326
Delete or rename the trigger.
324327

325328
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
327330
``z_repack_trigger`` in alphabetical order.
328331

329332
Delete or rename the trigger.
@@ -348,7 +351,8 @@ pg_repack cannot reorganize tables using GiST indexes.
348351
DDL commands
349352
^^^^^^^^^^^^
350353

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
352356
cases pg_repack will fail and rollback correctly, but there are some cases
353357
which may result in data corruption.
354358

0 commit comments

Comments
 (0)