Try to repack all tables with pkey, not only the ones with ckey

This is consistent with --no-order not been required anymore.
This commit is contained in:
Daniele Varrazzo 2013-04-17 18:56:50 +01:00
parent b3304b8a69
commit 3d0b02c654
3 changed files with 8 additions and 5 deletions

View File

@ -114,15 +114,20 @@ SELECT * FROM tbl_with_dropped_toast;
--
-- do repack
--
\! pg_repack --dbname=contrib_regression --table=tbl_cluster
INFO: repacking table "tbl_cluster"
\! pg_repack --dbname=contrib_regression --table=tbl_badindex
INFO: repacking table "tbl_badindex"
WARNING: skipping invalid index: CREATE UNIQUE INDEX idx_badindex_n ON tbl_badindex USING btree (n)
\! pg_repack --dbname=contrib_regression
INFO: repacking table "tbl_cluster"
INFO: repacking table "tbl_only_pkey"
INFO: repacking table "tbl_gistkey"
INFO: repacking table "tbl_with_dropped_column"
INFO: repacking table "tbl_with_dropped_toast"
\! pg_repack --dbname=contrib_regression --table=tbl_cluster
INFO: repacking table "tbl_cluster"
INFO: repacking table "tbl_badindex"
WARNING: skipping invalid index: CREATE UNIQUE INDEX idx_badindex_n ON tbl_badindex USING btree (n)
INFO: repacking table "tbl_idxopts"
--
-- after
--

View File

@ -521,8 +521,6 @@ repack_one_database(const char *orderby, char *errbuf, size_t errsize)
else
{
appendStringInfoString(&sql, "pkid IS NOT NULL");
if (!orderby)
appendStringInfoString(&sql, " AND ckid IS NOT NULL");
}
/* double check the parameters array is sane */

View File

@ -120,9 +120,9 @@ SELECT * FROM tbl_with_dropped_toast;
-- do repack
--
\! pg_repack --dbname=contrib_regression --table=tbl_cluster
\! pg_repack --dbname=contrib_regression --table=tbl_badindex
\! pg_repack --dbname=contrib_regression
\! pg_repack --dbname=contrib_regression --table=tbl_cluster
--
-- after