-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Skipping repacking the invalid indexes could lead to corrupting the invalid indexes. In some rare cases, this might cause inserts to tables to fail as changes to a table continuously be applied to invalid indexes on it and updates to corrupted invalid indexes potentially might fail by the checks done during insertion. Therefore, by default do not repack a table with invalid indexes. Repack only user explicitly specifies --no-error-on-invalid-index.
- Loading branch information
Showing
9 changed files
with
144 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
-- | ||
-- do repack | ||
-- | ||
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --no-error-on-invalid-index | ||
INFO: repacking table "public.tbl_cluster" | ||
\! pg_repack --dbname=contrib_regression --table=tbl_badindex --no-error-on-invalid-index | ||
INFO: repacking table "public.tbl_badindex" | ||
WARNING: skipping invalid index: CREATE UNIQUE INDEX idx_badindex_n ON public.tbl_badindex USING btree (n) | ||
\! pg_repack --dbname=contrib_regression --no-error-on-invalid-index | ||
INFO: repacking table "public.tbl_badindex" | ||
WARNING: skipping invalid index: CREATE UNIQUE INDEX idx_badindex_n ON public.tbl_badindex USING btree (n) | ||
INFO: repacking table "public.tbl_cluster" | ||
INFO: repacking table "public.tbl_gistkey" | ||
INFO: repacking table "public.tbl_idxopts" | ||
INFO: repacking table "public.tbl_incl_pkey" | ||
INFO: repacking table "public.tbl_only_pkey" | ||
INFO: repacking table "public.tbl_order" | ||
INFO: repacking table "public.tbl_storage_plain" | ||
INFO: repacking table "public.tbl_with_dropped_column" | ||
INFO: repacking table "public.tbl_with_dropped_toast" | ||
INFO: repacking table "public.tbl_with_mod_column_storage" | ||
INFO: repacking table "public.tbl_with_toast" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
-- | ||
-- do repack | ||
-- | ||
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --no-error-on-invalid-index | ||
INFO: repacking table "public.tbl_cluster" | ||
\! pg_repack --dbname=contrib_regression --table=tbl_badindex --no-error-on-invalid-index | ||
INFO: repacking table "public.tbl_badindex" | ||
WARNING: skipping invalid index: CREATE UNIQUE INDEX idx_badindex_n ON public.tbl_badindex USING btree (n) | ||
\! pg_repack --dbname=contrib_regression --no-error-on-invalid-index | ||
INFO: repacking table "public.tbl_badindex" | ||
WARNING: skipping invalid index: CREATE UNIQUE INDEX idx_badindex_n ON public.tbl_badindex USING btree (n) | ||
INFO: repacking table "public.tbl_cluster" | ||
INFO: repacking table "public.tbl_gistkey" | ||
INFO: repacking table "public.tbl_idxopts" | ||
INFO: repacking table "public.tbl_only_pkey" | ||
INFO: repacking table "public.tbl_order" | ||
INFO: repacking table "public.tbl_storage_plain" | ||
INFO: repacking table "public.tbl_with_dropped_column" | ||
INFO: repacking table "public.tbl_with_dropped_toast" | ||
INFO: repacking table "public.tbl_with_mod_column_storage" | ||
INFO: repacking table "public.tbl_with_toast" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- | ||
-- do repack | ||
-- | ||
|
||
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --no-error-on-invalid-index | ||
\! pg_repack --dbname=contrib_regression --table=tbl_badindex --no-error-on-invalid-index | ||
\! pg_repack --dbname=contrib_regression --no-error-on-invalid-index |