Skip to content

Commit

Permalink
Documentation : the wait timeout flag (#188)
Browse files Browse the repository at this point in the history
* Documentation : the wait timeout flag

I ran into a situation where the timeout was reached at the very beginning of the operations (because I use -D and there was an autovacuum running), and I was confused by the documentation.
The details section of the documentation states clearly that the ACCESS EXCLUSIVE locks are needed at the beginning and at the end of the repack, but I propose to make the `--wait-timeout`flag documentation a little clearer on this.

Thank you for this amazing tool btw !

---------

Co-authored-by: Andreas Scherbaum <[email protected]>
  • Loading branch information
magat and andreasscherbaum authored Mar 23, 2023
1 parent 652b10c commit 7eaa988
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions doc/pg_repack.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,14 @@ Reorg Options
with the ``--table`` or ``--parent-table`` options.

``-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
wait to acquire this lock. If the lock cannot be taken after this duration
and ``--no-kill-backend`` option is not specified, pg_repack will forcibly
cancel the conflicting queries. If you are using PostgreSQL version 8.4
or newer, pg_repack will fall back to using pg_terminate_backend() to
disconnect any remaining backends after twice this timeout has passed.
pg_repack needs to take one exclusive lock at the beginning and and one

This comment has been minimized.

Copy link
@xzilla

xzilla Mar 24, 2023

typo: "and and"

wordsmithing: "... at the beginning as well as one exclusive lock at the end of the repacking process"

This comment has been minimized.

Copy link
@andreasscherbaum

andreasscherbaum Mar 24, 2023

Author Collaborator
exclusive lock at the end of the reorganization. This setting controls
how many seconds pg_repack will wait to acquire this lock. If the lock
cannot be taken after this duration and ``--no-kill-backend`` option is
not specified, pg_repack will forcibly cancel the conflicting queries.
If you are using PostgreSQL version 8.4 or newer, pg_repack will fall
back to using pg_terminate_backend() to disconnect any remaining
backends after twice this timeout has passed.
The default is 60 seconds.

``-D``, ``--no-kill-backend``
Expand Down

0 comments on commit 7eaa988

Please sign in to comment.