From 7617e07f100173f4de062b10e5d1218ab7368de3 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Wed, 17 Apr 2013 01:44:50 +0100 Subject: [PATCH] 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. --- bin/pg_repack.c | 6 +++--- doc/pg_repack.rst | 38 ++++++++++++++++++++------------------ 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/bin/pg_repack.c b/bin/pg_repack.c index 3460379..d25d3d7 100644 --- a/bin/pg_repack.c +++ b/bin/pg_repack.c @@ -1452,10 +1452,10 @@ pgut_help(bool details) printf("Options:\n"); printf(" -a, --all repack all databases\n"); - printf(" -j --jobs Use this many parallel jobs for each table\n"); - printf(" -n, --no-order do vacuum full instead of cluster\n"); - printf(" -o, --order-by=COLUMNS order by columns instead of cluster keys\n"); printf(" -t, --table=TABLE repack specific table only\n"); + printf(" -o, --order-by=COLUMNS order by columns instead of cluster keys\n"); + printf(" -n, --no-order do vacuum full instead of cluster\n"); + printf(" -j --jobs Use this many parallel jobs for each table\n"); printf(" -T, --wait-timeout=SECS timeout to cancel other backends on conflict\n"); printf(" -Z, --no-analyze don't analyze at end\n"); } diff --git a/doc/pg_repack.rst b/doc/pg_repack.rst index e03dea8..4d2e38e 100644 --- a/doc/pg_repack.rst +++ b/doc/pg_repack.rst @@ -117,10 +117,10 @@ The following options can be specified in ``OPTIONS``. Options: -a, --all repack all databases - -j, --jobs Use this many parallel jobs for each table - -n, --no-order do vacuum full instead of cluster - -o, --order-by=COLUMNS order by columns instead of cluster keys -t, --table=TABLE repack specific table only + -o, --order-by=COLUMNS order by columns instead of cluster keys + -n, --no-order do vacuum full instead of cluster + -j, --jobs Use this many parallel jobs for each table -T, --wait-timeout=SECS timeout to cancel other backends on conflict -Z, --no-analyze don't analyze at end @@ -142,26 +142,27 @@ Generic options: Reorg Options ^^^^^^^^^^^^^ -Options to order rows. If not specified, pg_repack performs an online CLUSTER -using cluster indexes. Only one option can be specified. You may also specify -target tables or databases. - -``-j``, ``--jobs`` - Create the specified number of extra connections to PostgreSQL, and - use these extra connections to parallelize the rebuild of indexes - on each table. If your PostgreSQL server has extra cores and disk - I/O available, this can be a useful way to speed up pg_repack. - -``-n``, ``--no-order`` - Perform an online VACUUM FULL. - -``-o COLUMNS [,...]``, ``--order-by=COLUMNS [,...]`` - Perform an online CLUSTER ordered by the specified columns. +``-a``, ``--all`` + Attempt repack all the databases of the cluster. Databases where the + ``pg_repack`` extension is not installed will be skipped. ``-t TABLE``, ``--table=TABLE`` Reorganize the specified table only. By default, all eligible tables in the target databases are reorganized. +``-o COLUMNS [,...]``, ``--order-by=COLUMNS [,...]`` + Perform an online CLUSTER ordered by the specified columns. + +``-n``, ``--no-order`` + Perform an online VACUUM FULL. Since version 1.2 this is the default for + non-clustered tables. + +``-j``, ``--jobs`` + Create the specified number of extra connections to PostgreSQL, and + use these extra connections to parallelize the rebuild of indexes + on each table. If your PostgreSQL server has extra cores and disk + I/O available, this can be a useful way to speed up pg_repack. + ``-T SECS``, ``--wait-timeout=SECS`` pg_repack needs to take an exclusive lock at the end of the reorganization. This setting controls how many seconds pg_repack will @@ -175,6 +176,7 @@ target tables or databases. Disable ANALYZE after the reorganization. If not specified, run ANALYZE after the reorganization. + Connection Options ^^^^^^^^^^^^^^^^^^