Skip to content

Commit

Permalink
Give a more descriptive name to -X option, and update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
farrokhi committed Mar 24, 2023
1 parent 78d7440 commit d59c3fd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/pg_repack.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ static bool sqlstate_equals(PGresult *res, const char *state)

static bool analyze = true;
static bool alldb = false;
static bool no_paranoia = false;
static bool ignore_transactions = false;
static bool noorder = false;
static SimpleStringList parent_table_list = {NULL, NULL};
static SimpleStringList table_list = {NULL, NULL};
Expand Down Expand Up @@ -270,7 +270,7 @@ utoa(unsigned int value, char *buffer)
static pgut_option options[] =
{
{ 'b', 'a', "all", &alldb },
{ 'b', 'X', "disable-paranoia", &no_paranoia },
{ 'b', 'X', "ignore-transactions", &ignore_transactions },
{ 'l', 't', "table", &table_list },
{ 'l', 'I', "parent-table", &parent_table_list },
{ 'l', 'c', "schema", &schema_list },
Expand Down Expand Up @@ -1570,7 +1570,7 @@ repack_one_table(repack_table *table, const char *orderby)
/* display a warning if there are still one or more transactions
* alive, but continue
*/
if (no_paranoia)
if (ignore_transactions)
{
elog(NOTICE, "There are %d transactions waiting to finish, but skipping.", num);
break;
Expand Down Expand Up @@ -2366,5 +2366,5 @@ pgut_help(bool details)
printf(" -Z, --no-analyze don't analyze at end\n");
printf(" -k, --no-superuser-check skip superuser checks in client\n");
printf(" -C, --exclude-extension don't repack tables which belong to specific extension\n");
printf(" -X, --disable-paranoia don't wait for other existing transactions (use with care)\n");
printf(" -X, --ignore-transactions don't wait for running transactions (use with care)\n");
}
7 changes: 7 additions & 0 deletions doc/pg_repack.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ Options:
-Z, --no-analyze don't analyze at end
-k, --no-superuser-check skip superuser checks in client
-C, --exclude-extension don't repack tables which belong to specific extension
-X, --ignore-transactions don't wait for running transactions (use with care)

Connection options:
-d, --dbname=DBNAME database to connect
Expand Down Expand Up @@ -224,6 +225,12 @@ Reorg Options
Skip tables that belong to the specified extension(s). Some extensions
may heavily depend on such tables at planning time etc.

``-X``, ``--ignore-transactions``
Proceed without waiting for running transactions to finish.
Default behavior might not be desired on busy databases with
long-running transactions


Connection Options
^^^^^^^^^^^^^^^^^^

Expand Down

0 comments on commit d59c3fd

Please sign in to comment.