Skip to content

Commit

Permalink
Add docs and test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Richman committed Apr 15, 2024
1 parent c99c024 commit 2fbe4be
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/pg_repack.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ Options:
-k, --no-superuser-check skip superuser checks in client
-C, --exclude-extension don't repack tables which belong to specific extension
--error-on-invalid-index don't repack when invalid index is found
--apply-count number of tuples to apply in one trasaction during replay
--switch-threshold switch tables when that many tuples are left to catchup

Connection options:
Expand Down
5 changes: 5 additions & 0 deletions regress/expected/repack-check.out
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,11 @@ INFO: repacking index "public.child_b_2_pkey"
INFO: repacking indexes of "public.parent_b"
INFO: repacking index "public.parent_b_pkey"
--
-- Apply count
--
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --apply-count 1234
INFO: repacking table "public.tbl_cluster"
--
-- Switch threshold
--
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --switch-threshold 200
Expand Down
4 changes: 4 additions & 0 deletions regress/sql/repack-check.sql
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ CREATE TABLE child_b_2(val integer primary key) INHERITS(parent_b);
-- => OK
\! pg_repack --dbname=contrib_regression --parent-table=parent_a --parent-table=parent_b --only-indexes

--
-- Apply count
--
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --apply-count 1234
--
-- Switch threshold
--
Expand Down

0 comments on commit 2fbe4be

Please sign in to comment.