Skip to content

Commit 7617e07

Browse files
committed
Options sorted in a slightly more rational order
--no-order now is almost useless, but list it next to --order-by. --jobs only specifies how to do something, not what to do. On the same basis probably --no-analyze should be pushed further up.
1 parent 8efbd9e commit 7617e07

File tree

2 files changed

+22
-20
lines changed

2 files changed

+22
-20
lines changed

bin/pg_repack.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,10 +1452,10 @@ pgut_help(bool details)
14521452

14531453
printf("Options:\n");
14541454
printf(" -a, --all repack all databases\n");
1455-
printf(" -j --jobs Use this many parallel jobs for each table\n");
1456-
printf(" -n, --no-order do vacuum full instead of cluster\n");
1457-
printf(" -o, --order-by=COLUMNS order by columns instead of cluster keys\n");
14581455
printf(" -t, --table=TABLE repack specific table only\n");
1456+
printf(" -o, --order-by=COLUMNS order by columns instead of cluster keys\n");
1457+
printf(" -n, --no-order do vacuum full instead of cluster\n");
1458+
printf(" -j --jobs Use this many parallel jobs for each table\n");
14591459
printf(" -T, --wait-timeout=SECS timeout to cancel other backends on conflict\n");
14601460
printf(" -Z, --no-analyze don't analyze at end\n");
14611461
}

doc/pg_repack.rst

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ The following options can be specified in ``OPTIONS``.
117117

118118
Options:
119119
-a, --all repack all databases
120-
-j, --jobs Use this many parallel jobs for each table
121-
-n, --no-order do vacuum full instead of cluster
122-
-o, --order-by=COLUMNS order by columns instead of cluster keys
123120
-t, --table=TABLE repack specific table only
121+
-o, --order-by=COLUMNS order by columns instead of cluster keys
122+
-n, --no-order do vacuum full instead of cluster
123+
-j, --jobs Use this many parallel jobs for each table
124124
-T, --wait-timeout=SECS timeout to cancel other backends on conflict
125125
-Z, --no-analyze don't analyze at end
126126

@@ -142,25 +142,26 @@ Generic options:
142142
Reorg Options
143143
^^^^^^^^^^^^^
144144

145-
Options to order rows. If not specified, pg_repack performs an online CLUSTER
146-
using cluster indexes. Only one option can be specified. You may also specify
147-
target tables or databases.
148-
149-
``-j``, ``--jobs``
150-
Create the specified number of extra connections to PostgreSQL, and
151-
use these extra connections to parallelize the rebuild of indexes
152-
on each table. If your PostgreSQL server has extra cores and disk
153-
I/O available, this can be a useful way to speed up pg_repack.
145+
``-a``, ``--all``
146+
Attempt repack all the databases of the cluster. Databases where the
147+
``pg_repack`` extension is not installed will be skipped.
154148

155-
``-n``, ``--no-order``
156-
Perform an online VACUUM FULL.
149+
``-t TABLE``, ``--table=TABLE``
150+
Reorganize the specified table only. By default, all eligible tables in
151+
the target databases are reorganized.
157152

158153
``-o COLUMNS [,...]``, ``--order-by=COLUMNS [,...]``
159154
Perform an online CLUSTER ordered by the specified columns.
160155

161-
``-t TABLE``, ``--table=TABLE``
162-
Reorganize the specified table only. By default, all eligible tables in
163-
the target databases are reorganized.
156+
``-n``, ``--no-order``
157+
Perform an online VACUUM FULL. Since version 1.2 this is the default for
158+
non-clustered tables.
159+
160+
``-j``, ``--jobs``
161+
Create the specified number of extra connections to PostgreSQL, and
162+
use these extra connections to parallelize the rebuild of indexes
163+
on each table. If your PostgreSQL server has extra cores and disk
164+
I/O available, this can be a useful way to speed up pg_repack.
164165

165166
``-T SECS``, ``--wait-timeout=SECS``
166167
pg_repack needs to take an exclusive lock at the end of the
@@ -175,6 +176,7 @@ target tables or databases.
175176
Disable ANALYZE after the reorganization. If not specified, run ANALYZE
176177
after the reorganization.
177178

179+
178180
Connection Options
179181
^^^^^^^^^^^^^^^^^^
180182

0 commit comments

Comments
 (0)