From b9c7189fa9bdc25cef4459506ba6aa114e0fc73d Mon Sep 17 00:00:00 2001 From: Josh Kupershmidt Date: Thu, 13 Dec 2012 21:10:59 -0700 Subject: [PATCH] Add description of --jobs to the docs. Also, add missing newline in --help output. --- bin/pg_repack.c | 2 +- doc/pg_repack.rst | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/pg_repack.c b/bin/pg_repack.c index e93ebcb..935bc5a 100644 --- a/bin/pg_repack.c +++ b/bin/pg_repack.c @@ -1416,7 +1416,7 @@ pgut_help(bool details) printf("Options:\n"); printf(" -a, --all repack all databases\n"); - printf(" -j --jobs Use this many parallel jobs"); + 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"); diff --git a/doc/pg_repack.rst b/doc/pg_repack.rst index 756d1fc..95fb685 100644 --- a/doc/pg_repack.rst +++ b/doc/pg_repack.rst @@ -117,6 +117,7 @@ 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 @@ -145,6 +146,12 @@ 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.