Fixed tests to match info messages including the public schema

This commit is contained in:
Daniele Varrazzo 2018-05-19 16:41:56 +01:00
parent 64cc2070ed
commit 9c1da1bff1
10 changed files with 142 additions and 142 deletions

View File

@ -10,7 +10,7 @@ SELECT repack.get_order_by('issue3_1_idx'::regclass::oid, 'issue3_1'::regclass::
(1 row) (1 row)
\! pg_repack --dbname=contrib_regression --table=issue3_1 \! pg_repack --dbname=contrib_regression --table=issue3_1
INFO: repacking table "issue3_1" INFO: repacking table "public.issue3_1"
CREATE TABLE issue3_2 (col1 int NOT NULL, col2 text NOT NULL); CREATE TABLE issue3_2 (col1 int NOT NULL, col2 text NOT NULL);
CREATE UNIQUE INDEX issue3_2_idx ON issue3_2 (col1 DESC, col2 text_pattern_ops); CREATE UNIQUE INDEX issue3_2_idx ON issue3_2 (col1 DESC, col2 text_pattern_ops);
SELECT repack.get_order_by('issue3_2_idx'::regclass::oid, 'issue3_2'::regclass::oid); SELECT repack.get_order_by('issue3_2_idx'::regclass::oid, 'issue3_2'::regclass::oid);
@ -20,7 +20,7 @@ SELECT repack.get_order_by('issue3_2_idx'::regclass::oid, 'issue3_2'::regclass::
(1 row) (1 row)
\! pg_repack --dbname=contrib_regression --table=issue3_2 \! pg_repack --dbname=contrib_regression --table=issue3_2
INFO: repacking table "issue3_2" INFO: repacking table "public.issue3_2"
CREATE TABLE issue3_3 (col1 int NOT NULL, col2 text NOT NULL); CREATE TABLE issue3_3 (col1 int NOT NULL, col2 text NOT NULL);
CREATE UNIQUE INDEX issue3_3_idx ON issue3_3 (col1 DESC, col2 DESC); CREATE UNIQUE INDEX issue3_3_idx ON issue3_3 (col1 DESC, col2 DESC);
SELECT repack.get_order_by('issue3_3_idx'::regclass::oid, 'issue3_3'::regclass::oid); SELECT repack.get_order_by('issue3_3_idx'::regclass::oid, 'issue3_3'::regclass::oid);
@ -30,7 +30,7 @@ SELECT repack.get_order_by('issue3_3_idx'::regclass::oid, 'issue3_3'::regclass::
(1 row) (1 row)
\! pg_repack --dbname=contrib_regression --table=issue3_3 \! pg_repack --dbname=contrib_regression --table=issue3_3
INFO: repacking table "issue3_3" INFO: repacking table "public.issue3_3"
CREATE TABLE issue3_4 (col1 int NOT NULL, col2 text NOT NULL); CREATE TABLE issue3_4 (col1 int NOT NULL, col2 text NOT NULL);
CREATE UNIQUE INDEX issue3_4_idx ON issue3_4 (col1 NULLS FIRST, col2 text_pattern_ops DESC NULLS LAST); CREATE UNIQUE INDEX issue3_4_idx ON issue3_4 (col1 NULLS FIRST, col2 text_pattern_ops DESC NULLS LAST);
SELECT repack.get_order_by('issue3_4_idx'::regclass::oid, 'issue3_4'::regclass::oid); SELECT repack.get_order_by('issue3_4_idx'::regclass::oid, 'issue3_4'::regclass::oid);
@ -40,7 +40,7 @@ SELECT repack.get_order_by('issue3_4_idx'::regclass::oid, 'issue3_4'::regclass::
(1 row) (1 row)
\! pg_repack --dbname=contrib_regression --table=issue3_4 \! pg_repack --dbname=contrib_regression --table=issue3_4
INFO: repacking table "issue3_4" INFO: repacking table "public.issue3_4"
CREATE TABLE issue3_5 (col1 int NOT NULL, col2 text NOT NULL); CREATE TABLE issue3_5 (col1 int NOT NULL, col2 text NOT NULL);
CREATE UNIQUE INDEX issue3_5_idx ON issue3_5 (col1 DESC NULLS FIRST, col2 COLLATE "POSIX" DESC); CREATE UNIQUE INDEX issue3_5_idx ON issue3_5 (col1 DESC NULLS FIRST, col2 COLLATE "POSIX" DESC);
SELECT repack.get_order_by('issue3_5_idx'::regclass::oid, 'issue3_5'::regclass::oid); SELECT repack.get_order_by('issue3_5_idx'::regclass::oid, 'issue3_5'::regclass::oid);
@ -50,4 +50,4 @@ SELECT repack.get_order_by('issue3_5_idx'::regclass::oid, 'issue3_5'::regclass::
(1 row) (1 row)
\! pg_repack --dbname=contrib_regression --table=issue3_5 \! pg_repack --dbname=contrib_regression --table=issue3_5
INFO: repacking table "issue3_5" INFO: repacking table "public.issue3_5"

View File

@ -7,7 +7,7 @@ SET client_min_messages = warning;
CREATE ROLE nosuper WITH LOGIN; CREATE ROLE nosuper WITH LOGIN;
-- => OK -- => OK
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --no-superuser-check \! pg_repack --dbname=contrib_regression --table=tbl_cluster --no-superuser-check
INFO: repacking table "tbl_cluster" INFO: repacking table "public.tbl_cluster"
-- => ERROR -- => ERROR
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --username=nosuper \! pg_repack --dbname=contrib_regression --table=tbl_cluster --username=nosuper
ERROR: pg_repack failed with error: You must be a superuser to use pg_repack ERROR: pg_repack failed with error: You must be a superuser to use pg_repack

View File

@ -7,7 +7,7 @@ SET client_min_messages = warning;
CREATE ROLE nosuper WITH LOGIN; CREATE ROLE nosuper WITH LOGIN;
-- => OK -- => OK
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --no-superuser-check \! pg_repack --dbname=contrib_regression --table=tbl_cluster --no-superuser-check
INFO: repacking table "tbl_cluster" INFO: repacking table "public.tbl_cluster"
-- => ERROR -- => ERROR
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --username=nosuper \! pg_repack --dbname=contrib_regression --table=tbl_cluster --username=nosuper
ERROR: pg_repack failed with error: You must be a superuser to use pg_repack ERROR: pg_repack failed with error: You must be a superuser to use pg_repack

View File

@ -141,24 +141,24 @@ CREATE TABLE tbl_pk_uk (col1 int NOT NULL, col2 int NOT NULL, PRIMARY KEY(col1,
CREATE TABLE tbl_nn_puk (col1 int NOT NULL, col2 int NOT NULL); CREATE TABLE tbl_nn_puk (col1 int NOT NULL, col2 int NOT NULL);
CREATE UNIQUE INDEX tbl_nn_puk_pcol1_idx ON tbl_nn_puk(col1) WHERE col1 < 10; CREATE UNIQUE INDEX tbl_nn_puk_pcol1_idx ON tbl_nn_puk(col1) WHERE col1 < 10;
\! pg_repack --dbname=contrib_regression --table=tbl_nn \! pg_repack --dbname=contrib_regression --table=tbl_nn
WARNING: relation "tbl_nn" must have a primary key or not-null unique keys WARNING: relation "public.tbl_nn" must have a primary key or not-null unique keys
-- => WARNING -- => WARNING
\! pg_repack --dbname=contrib_regression --table=tbl_uk \! pg_repack --dbname=contrib_regression --table=tbl_uk
WARNING: relation "tbl_uk" must have a primary key or not-null unique keys WARNING: relation "public.tbl_uk" must have a primary key or not-null unique keys
-- => WARNING -- => WARNING
\! pg_repack --dbname=contrib_regression --table=tbl_nn_uk \! pg_repack --dbname=contrib_regression --table=tbl_nn_uk
INFO: repacking table "tbl_nn_uk" INFO: repacking table "public.tbl_nn_uk"
-- => OK -- => OK
\! pg_repack --dbname=contrib_regression --table=tbl_pk_uk \! pg_repack --dbname=contrib_regression --table=tbl_pk_uk
INFO: repacking table "tbl_pk_uk" INFO: repacking table "public.tbl_pk_uk"
-- => OK -- => OK
\! pg_repack --dbname=contrib_regression --table=tbl_pk_uk --only-indexes \! pg_repack --dbname=contrib_regression --table=tbl_pk_uk --only-indexes
INFO: repacking indexes of "tbl_pk_uk" INFO: repacking indexes of "tbl_pk_uk"
INFO: repacking index "public"."tbl_pk_uk_col2_col1_key" INFO: repacking index "public.tbl_pk_uk_col2_col1_key"
INFO: repacking index "public"."tbl_pk_uk_pkey" INFO: repacking index "public.tbl_pk_uk_pkey"
-- => OK -- => OK
\! pg_repack --dbname=contrib_regression --table=tbl_nn_puk \! pg_repack --dbname=contrib_regression --table=tbl_nn_puk
WARNING: relation "tbl_nn_puk" must have a primary key or not-null unique keys WARNING: relation "public.tbl_nn_puk" must have a primary key or not-null unique keys
-- => WARNING -- => WARNING
-- --
-- Triggers handling -- Triggers handling
@ -169,23 +169,23 @@ LANGUAGE plpgsql;
CREATE TABLE trg1 (id integer PRIMARY KEY); CREATE TABLE trg1 (id integer PRIMARY KEY);
CREATE TRIGGER repack_trigger_1 AFTER UPDATE ON trg1 FOR EACH ROW EXECUTE PROCEDURE trgtest(); CREATE TRIGGER repack_trigger_1 AFTER UPDATE ON trg1 FOR EACH ROW EXECUTE PROCEDURE trgtest();
\! pg_repack --dbname=contrib_regression --table=trg1 \! pg_repack --dbname=contrib_regression --table=trg1
INFO: repacking table "trg1" INFO: repacking table "public.trg1"
CREATE TABLE trg2 (id integer PRIMARY KEY); CREATE TABLE trg2 (id integer PRIMARY KEY);
CREATE TRIGGER repack_trigger AFTER UPDATE ON trg2 FOR EACH ROW EXECUTE PROCEDURE trgtest(); CREATE TRIGGER repack_trigger AFTER UPDATE ON trg2 FOR EACH ROW EXECUTE PROCEDURE trgtest();
\! pg_repack --dbname=contrib_regression --table=trg2 \! pg_repack --dbname=contrib_regression --table=trg2
INFO: repacking table "trg2" INFO: repacking table "public.trg2"
WARNING: the table "trg2" already has a trigger called "repack_trigger" WARNING: the table "public.trg2" already has a trigger called "repack_trigger"
DETAIL: The trigger was probably installed during a previous attempt to run pg_repack on the table which was interrupted and for some reason failed to clean up the temporary objects. Please drop the trigger or drop and recreate the pg_repack extension altogether to remove all the temporary objects left over. DETAIL: The trigger was probably installed during a previous attempt to run pg_repack on the table which was interrupted and for some reason failed to clean up the temporary objects. Please drop the trigger or drop and recreate the pg_repack extension altogether to remove all the temporary objects left over.
CREATE TABLE trg3 (id integer PRIMARY KEY); CREATE TABLE trg3 (id integer PRIMARY KEY);
CREATE TRIGGER repack_trigger_1 BEFORE UPDATE ON trg3 FOR EACH ROW EXECUTE PROCEDURE trgtest(); CREATE TRIGGER repack_trigger_1 BEFORE UPDATE ON trg3 FOR EACH ROW EXECUTE PROCEDURE trgtest();
\! pg_repack --dbname=contrib_regression --table=trg3 \! pg_repack --dbname=contrib_regression --table=trg3
INFO: repacking table "trg3" INFO: repacking table "public.trg3"
-- --
-- Table re-organization using specific column -- Table re-organization using specific column
-- --
-- reorganize table using cluster key. Sort in ascending order. -- reorganize table using cluster key. Sort in ascending order.
\! pg_repack --dbname=contrib_regression --table=tbl_order \! pg_repack --dbname=contrib_regression --table=tbl_order
INFO: repacking table "tbl_order" INFO: repacking table "public.tbl_order"
SELECT ctid, c FROM tbl_order WHERE ctid <= '(0,10)'; SELECT ctid, c FROM tbl_order WHERE ctid <= '(0,10)';
ctid | c ctid | c
--------+---- --------+----
@ -203,7 +203,7 @@ SELECT ctid, c FROM tbl_order WHERE ctid <= '(0,10)';
-- reorganize table using specific column order. Sort in descending order. -- reorganize table using specific column order. Sort in descending order.
\! pg_repack --dbname=contrib_regression --table=tbl_order -o "c DESC" \! pg_repack --dbname=contrib_regression --table=tbl_order -o "c DESC"
INFO: repacking table "tbl_order" INFO: repacking table "public.tbl_order"
SELECT ctid, c FROM tbl_order WHERE ctid <= '(0,10)'; SELECT ctid, c FROM tbl_order WHERE ctid <= '(0,10)';
ctid | c ctid | c
--------+----- --------+-----
@ -224,7 +224,7 @@ SELECT ctid, c FROM tbl_order WHERE ctid <= '(0,10)';
-- --
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --dry-run \! pg_repack --dbname=contrib_regression --table=tbl_cluster --dry-run
INFO: Dry run enabled, not executing repack INFO: Dry run enabled, not executing repack
INFO: repacking table "tbl_cluster" INFO: repacking table "public.tbl_cluster"
-- Test --schema -- Test --schema
-- --
CREATE SCHEMA test_schema1; CREATE SCHEMA test_schema1;
@ -253,7 +253,7 @@ ERROR: cannot repack specific schema(s) in all databases
-- don't kill backend -- don't kill backend
-- --
\! pg_repack --dbname=contrib_regression --table=tbl_cluster --no-kill-backend \! pg_repack --dbname=contrib_regression --table=tbl_cluster --no-kill-backend
INFO: repacking table "tbl_cluster" INFO: repacking table "public.tbl_cluster"
-- --
-- exclude extension check -- exclude extension check
-- --
@ -297,39 +297,39 @@ ERROR: cannot repack specific table(s) in schema, use schema.table notation inst
ERROR: cannot repack specific table(s) in all databases ERROR: cannot repack specific table(s) in all databases
-- => OK -- => OK
\! pg_repack --dbname=contrib_regression --table=parent_a --parent-table=parent_b \! pg_repack --dbname=contrib_regression --table=parent_a --parent-table=parent_b
INFO: repacking table "parent_a" INFO: repacking table "public.child_b_1"
INFO: repacking table "parent_b" INFO: repacking table "public.child_b_2"
INFO: repacking table "child_b_1" INFO: repacking table "public.parent_a"
INFO: repacking table "child_b_2" INFO: repacking table "public.parent_b"
-- => OK -- => OK
\! pg_repack --dbname=contrib_regression --parent-table=parent_a --parent-table=parent_b \! pg_repack --dbname=contrib_regression --parent-table=parent_a --parent-table=parent_b
INFO: repacking table "parent_a" INFO: repacking table "public.child_a_1"
INFO: repacking table "child_a_1" INFO: repacking table "public.child_a_2"
INFO: repacking table "child_a_2" INFO: repacking table "public.child_b_1"
INFO: repacking table "parent_b" INFO: repacking table "public.child_b_2"
INFO: repacking table "child_b_1" INFO: repacking table "public.parent_a"
INFO: repacking table "child_b_2" INFO: repacking table "public.parent_b"
-- => OK -- => OK
\! pg_repack --dbname=contrib_regression --table=parent_a --parent-table=parent_b --only-indexes \! pg_repack --dbname=contrib_regression --table=parent_a --parent-table=parent_b --only-indexes
INFO: repacking indexes of "parent_a" INFO: repacking indexes of "parent_a"
INFO: repacking index "public"."parent_a_pkey" INFO: repacking index "public.parent_a_pkey"
INFO: repacking indexes of "public.child_b_1" INFO: repacking indexes of "public.child_b_1"
INFO: repacking index "public"."child_b_1_pkey" INFO: repacking index "public.child_b_1_pkey"
INFO: repacking indexes of "public.child_b_2" INFO: repacking indexes of "public.child_b_2"
INFO: repacking index "public"."child_b_2_pkey" INFO: repacking index "public.child_b_2_pkey"
INFO: repacking indexes of "public.parent_b" INFO: repacking indexes of "public.parent_b"
INFO: repacking index "public"."parent_b_pkey" INFO: repacking index "public.parent_b_pkey"
-- => OK -- => OK
\! pg_repack --dbname=contrib_regression --parent-table=parent_a --parent-table=parent_b --only-indexes \! pg_repack --dbname=contrib_regression --parent-table=parent_a --parent-table=parent_b --only-indexes
INFO: repacking indexes of "public.child_a_1" INFO: repacking indexes of "public.child_a_1"
INFO: repacking index "public"."child_a_1_pkey" INFO: repacking index "public.child_a_1_pkey"
INFO: repacking indexes of "public.child_a_2" INFO: repacking indexes of "public.child_a_2"
INFO: repacking index "public"."child_a_2_pkey" INFO: repacking index "public.child_a_2_pkey"
INFO: repacking indexes of "public.parent_a" INFO: repacking indexes of "public.parent_a"
INFO: repacking index "public"."parent_a_pkey" INFO: repacking index "public.parent_a_pkey"
INFO: repacking indexes of "public.child_b_1" INFO: repacking indexes of "public.child_b_1"
INFO: repacking index "public"."child_b_1_pkey" INFO: repacking index "public.child_b_1_pkey"
INFO: repacking indexes of "public.child_b_2" INFO: repacking indexes of "public.child_b_2"
INFO: repacking index "public"."child_b_2_pkey" INFO: repacking index "public.child_b_2_pkey"
INFO: repacking indexes of "public.parent_b" INFO: repacking indexes of "public.parent_b"
INFO: repacking index "public"."parent_b_pkey" INFO: repacking index "public.parent_b_pkey"

View File

@ -2,19 +2,19 @@
-- do repack -- do repack
-- --
\! pg_repack --dbname=contrib_regression --table=tbl_cluster \! pg_repack --dbname=contrib_regression --table=tbl_cluster
INFO: repacking table "tbl_cluster" INFO: repacking table "public.tbl_cluster"
\! pg_repack --dbname=contrib_regression --table=tbl_badindex \! pg_repack --dbname=contrib_regression --table=tbl_badindex
INFO: repacking table "tbl_badindex" INFO: repacking table "public.tbl_badindex"
WARNING: skipping invalid index: CREATE UNIQUE INDEX idx_badindex_n ON tbl_badindex USING btree (n) WARNING: skipping invalid index: CREATE UNIQUE INDEX idx_badindex_n ON tbl_badindex USING btree (n)
\! pg_repack --dbname=contrib_regression \! pg_repack --dbname=contrib_regression
INFO: repacking table "tbl_cluster" INFO: repacking table "public.tbl_badindex"
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"
INFO: repacking table "tbl_badindex"
WARNING: skipping invalid index: CREATE UNIQUE INDEX idx_badindex_n ON tbl_badindex USING btree (n) WARNING: skipping invalid index: CREATE UNIQUE INDEX idx_badindex_n ON tbl_badindex USING btree (n)
INFO: repacking table "tbl_idxopts" INFO: repacking table "public.tbl_cluster"
INFO: repacking table "tbl_with_toast" INFO: repacking table "public.tbl_gistkey"
INFO: repacking table "tbl_with_mod_column_storage" INFO: repacking table "public.tbl_idxopts"
INFO: repacking table "tbl_order" INFO: repacking table "public.tbl_only_pkey"
INFO: repacking table "public.tbl_order"
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"

View File

@ -2,19 +2,19 @@
-- do repack -- do repack
-- --
\! pg_repack --dbname=contrib_regression --table=tbl_cluster \! pg_repack --dbname=contrib_regression --table=tbl_cluster
INFO: repacking table "tbl_cluster" INFO: repacking table "public.tbl_cluster"
\! pg_repack --dbname=contrib_regression --table=tbl_badindex \! pg_repack --dbname=contrib_regression --table=tbl_badindex
INFO: repacking table "tbl_badindex" INFO: repacking table "public.tbl_badindex"
WARNING: skipping invalid index: CREATE UNIQUE INDEX idx_badindex_n ON public.tbl_badindex USING btree (n) WARNING: skipping invalid index: CREATE UNIQUE INDEX idx_badindex_n ON public.tbl_badindex USING btree (n)
\! pg_repack --dbname=contrib_regression \! pg_repack --dbname=contrib_regression
INFO: repacking table "tbl_cluster" INFO: repacking table "public.tbl_badindex"
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"
INFO: repacking table "tbl_badindex"
WARNING: skipping invalid index: CREATE UNIQUE INDEX idx_badindex_n ON public.tbl_badindex USING btree (n) WARNING: skipping invalid index: CREATE UNIQUE INDEX idx_badindex_n ON public.tbl_badindex USING btree (n)
INFO: repacking table "tbl_idxopts" INFO: repacking table "public.tbl_cluster"
INFO: repacking table "tbl_with_toast" INFO: repacking table "public.tbl_gistkey"
INFO: repacking table "tbl_with_mod_column_storage" INFO: repacking table "public.tbl_idxopts"
INFO: repacking table "tbl_order" INFO: repacking table "public.tbl_only_pkey"
INFO: repacking table "public.tbl_order"
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"

View File

@ -68,7 +68,7 @@ WHERE indrelid = 'testts1'::regclass ORDER BY relname;
-- can move the tablespace from default -- can move the tablespace from default
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 --tablespace testts \! pg_repack --dbname=contrib_regression --no-order --table=testts1 --tablespace testts
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -88,7 +88,7 @@ SELECT * from testts1 order by id;
-- tablespace stays where it is -- tablespace stays where it is
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 \! pg_repack --dbname=contrib_regression --no-order --table=testts1
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -100,7 +100,7 @@ ORDER BY relname;
-- can move the ts back to default -- can move the ts back to default
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 -s pg_default \! pg_repack --dbname=contrib_regression --no-order --table=testts1 -s pg_default
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -111,7 +111,7 @@ ORDER BY relname;
-- can move the table together with the indexes -- can move the table together with the indexes
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 --tablespace testts --moveidx \! pg_repack --dbname=contrib_regression --no-order --table=testts1 --tablespace testts --moveidx
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -131,13 +131,13 @@ ERROR: cannot specify --moveidx (-S) without --tablespace (-s)
ERROR: cannot specify --moveidx (-S) without --tablespace (-s) ERROR: cannot specify --moveidx (-S) without --tablespace (-s)
-- not broken with order -- not broken with order
\! pg_repack --dbname=contrib_regression -o id --table=testts1 --tablespace pg_default --moveidx \! pg_repack --dbname=contrib_regression -o id --table=testts1 --tablespace pg_default --moveidx
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
--move all indexes of the table to a tablespace --move all indexes of the table to a tablespace
\! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --tablespace=testts \! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --tablespace=testts
INFO: repacking indexes of "testts1" INFO: repacking indexes of "testts1"
INFO: repacking index "public"."testts1_partial_idx" INFO: repacking index "public.testts1_partial_idx"
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
INFO: repacking index "public"."testts1_with_idx" INFO: repacking index "public.testts1_with_idx"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -152,9 +152,9 @@ ORDER BY relname;
--all indexes of tablespace remain in same tablespace --all indexes of tablespace remain in same tablespace
\! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes \! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes
INFO: repacking indexes of "testts1" INFO: repacking indexes of "testts1"
INFO: repacking index "public"."testts1_partial_idx" INFO: repacking index "public.testts1_partial_idx"
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
INFO: repacking index "public"."testts1_with_idx" INFO: repacking index "public.testts1_with_idx"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -169,9 +169,9 @@ ORDER BY relname;
--move all indexes of the table to pg_default --move all indexes of the table to pg_default
\! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --tablespace=pg_default \! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --tablespace=pg_default
INFO: repacking indexes of "testts1" INFO: repacking indexes of "testts1"
INFO: repacking index "public"."testts1_partial_idx" INFO: repacking index "public.testts1_partial_idx"
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
INFO: repacking index "public"."testts1_with_idx" INFO: repacking index "public.testts1_with_idx"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -182,7 +182,7 @@ ORDER BY relname;
--move one index to a tablespace --move one index to a tablespace
\! pg_repack --dbname=contrib_regression --index=testts1_pkey --tablespace=testts \! pg_repack --dbname=contrib_regression --index=testts1_pkey --tablespace=testts
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -194,7 +194,7 @@ ORDER BY relname;
--index tablespace stays as is --index tablespace stays as is
\! pg_repack --dbname=contrib_regression --index=testts1_pkey \! pg_repack --dbname=contrib_regression --index=testts1_pkey
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -206,7 +206,7 @@ ORDER BY relname;
--move index to pg_default --move index to pg_default
\! pg_repack --dbname=contrib_regression --index=testts1_pkey --tablespace=pg_default \! pg_repack --dbname=contrib_regression --index=testts1_pkey --tablespace=pg_default
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -217,8 +217,8 @@ ORDER BY relname;
--using multiple --index option --using multiple --index option
\! pg_repack --dbname=contrib_regression --index=testts1_pkey --index=testts1_with_idx --tablespace=testts \! pg_repack --dbname=contrib_regression --index=testts1_pkey --index=testts1_with_idx --tablespace=testts
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
INFO: repacking index "public"."testts1_with_idx" INFO: repacking index "public.testts1_with_idx"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'

View File

@ -68,7 +68,7 @@ WHERE indrelid = 'testts1'::regclass ORDER BY relname;
-- can move the tablespace from default -- can move the tablespace from default
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 --tablespace testts \! pg_repack --dbname=contrib_regression --no-order --table=testts1 --tablespace testts
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -88,7 +88,7 @@ SELECT * from testts1 order by id;
-- tablespace stays where it is -- tablespace stays where it is
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 \! pg_repack --dbname=contrib_regression --no-order --table=testts1
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -100,7 +100,7 @@ ORDER BY relname;
-- can move the ts back to default -- can move the ts back to default
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 -s pg_default \! pg_repack --dbname=contrib_regression --no-order --table=testts1 -s pg_default
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -111,7 +111,7 @@ ORDER BY relname;
-- can move the table together with the indexes -- can move the table together with the indexes
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 --tablespace testts --moveidx \! pg_repack --dbname=contrib_regression --no-order --table=testts1 --tablespace testts --moveidx
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -131,13 +131,13 @@ ERROR: cannot specify --moveidx (-S) without --tablespace (-s)
ERROR: cannot specify --moveidx (-S) without --tablespace (-s) ERROR: cannot specify --moveidx (-S) without --tablespace (-s)
-- not broken with order -- not broken with order
\! pg_repack --dbname=contrib_regression -o id --table=testts1 --tablespace pg_default --moveidx \! pg_repack --dbname=contrib_regression -o id --table=testts1 --tablespace pg_default --moveidx
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
--move all indexes of the table to a tablespace --move all indexes of the table to a tablespace
\! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --tablespace=testts \! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --tablespace=testts
INFO: repacking indexes of "testts1" INFO: repacking indexes of "testts1"
INFO: repacking index "public"."testts1_partial_idx" INFO: repacking index "public.testts1_partial_idx"
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
INFO: repacking index "public"."testts1_with_idx" INFO: repacking index "public.testts1_with_idx"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -152,9 +152,9 @@ ORDER BY relname;
--all indexes of tablespace remain in same tablespace --all indexes of tablespace remain in same tablespace
\! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes \! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes
INFO: repacking indexes of "testts1" INFO: repacking indexes of "testts1"
INFO: repacking index "public"."testts1_partial_idx" INFO: repacking index "public.testts1_partial_idx"
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
INFO: repacking index "public"."testts1_with_idx" INFO: repacking index "public.testts1_with_idx"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -169,9 +169,9 @@ ORDER BY relname;
--move all indexes of the table to pg_default --move all indexes of the table to pg_default
\! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --tablespace=pg_default \! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --tablespace=pg_default
INFO: repacking indexes of "testts1" INFO: repacking indexes of "testts1"
INFO: repacking index "public"."testts1_partial_idx" INFO: repacking index "public.testts1_partial_idx"
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
INFO: repacking index "public"."testts1_with_idx" INFO: repacking index "public.testts1_with_idx"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -182,7 +182,7 @@ ORDER BY relname;
--move one index to a tablespace --move one index to a tablespace
\! pg_repack --dbname=contrib_regression --index=testts1_pkey --tablespace=testts \! pg_repack --dbname=contrib_regression --index=testts1_pkey --tablespace=testts
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -194,7 +194,7 @@ ORDER BY relname;
--index tablespace stays as is --index tablespace stays as is
\! pg_repack --dbname=contrib_regression --index=testts1_pkey \! pg_repack --dbname=contrib_regression --index=testts1_pkey
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -206,7 +206,7 @@ ORDER BY relname;
--move index to pg_default --move index to pg_default
\! pg_repack --dbname=contrib_regression --index=testts1_pkey --tablespace=pg_default \! pg_repack --dbname=contrib_regression --index=testts1_pkey --tablespace=pg_default
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -217,8 +217,8 @@ ORDER BY relname;
--using multiple --index option --using multiple --index option
\! pg_repack --dbname=contrib_regression --index=testts1_pkey --index=testts1_with_idx --tablespace=testts \! pg_repack --dbname=contrib_regression --index=testts1_pkey --index=testts1_with_idx --tablespace=testts
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
INFO: repacking index "public"."testts1_with_idx" INFO: repacking index "public.testts1_with_idx"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'

View File

@ -68,7 +68,7 @@ WHERE indrelid = 'testts1'::regclass ORDER BY relname;
-- can move the tablespace from default -- can move the tablespace from default
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 --tablespace testts \! pg_repack --dbname=contrib_regression --no-order --table=testts1 --tablespace testts
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -88,7 +88,7 @@ SELECT * from testts1 order by id;
-- tablespace stays where it is -- tablespace stays where it is
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 \! pg_repack --dbname=contrib_regression --no-order --table=testts1
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -100,7 +100,7 @@ ORDER BY relname;
-- can move the ts back to default -- can move the ts back to default
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 -s pg_default \! pg_repack --dbname=contrib_regression --no-order --table=testts1 -s pg_default
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -111,7 +111,7 @@ ORDER BY relname;
-- can move the table together with the indexes -- can move the table together with the indexes
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 --tablespace testts --moveidx \! pg_repack --dbname=contrib_regression --no-order --table=testts1 --tablespace testts --moveidx
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -131,13 +131,13 @@ ERROR: cannot specify --moveidx (-S) without --tablespace (-s)
ERROR: cannot specify --moveidx (-S) without --tablespace (-s) ERROR: cannot specify --moveidx (-S) without --tablespace (-s)
-- not broken with order -- not broken with order
\! pg_repack --dbname=contrib_regression -o id --table=testts1 --tablespace pg_default --moveidx \! pg_repack --dbname=contrib_regression -o id --table=testts1 --tablespace pg_default --moveidx
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
--move all indexes of the table to a tablespace --move all indexes of the table to a tablespace
\! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --tablespace=testts \! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --tablespace=testts
INFO: repacking indexes of "testts1" INFO: repacking indexes of "testts1"
INFO: repacking index "public"."testts1_partial_idx" INFO: repacking index "public.testts1_partial_idx"
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
INFO: repacking index "public"."testts1_with_idx" INFO: repacking index "public.testts1_with_idx"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -152,9 +152,9 @@ ORDER BY relname;
--all indexes of tablespace remain in same tablespace --all indexes of tablespace remain in same tablespace
\! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes \! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes
INFO: repacking indexes of "testts1" INFO: repacking indexes of "testts1"
INFO: repacking index "public"."testts1_partial_idx" INFO: repacking index "public.testts1_partial_idx"
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
INFO: repacking index "public"."testts1_with_idx" INFO: repacking index "public.testts1_with_idx"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -169,9 +169,9 @@ ORDER BY relname;
--move all indexes of the table to pg_default --move all indexes of the table to pg_default
\! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --tablespace=pg_default \! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --tablespace=pg_default
INFO: repacking indexes of "testts1" INFO: repacking indexes of "testts1"
INFO: repacking index "public"."testts1_partial_idx" INFO: repacking index "public.testts1_partial_idx"
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
INFO: repacking index "public"."testts1_with_idx" INFO: repacking index "public.testts1_with_idx"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -182,7 +182,7 @@ ORDER BY relname;
--move one index to a tablespace --move one index to a tablespace
\! pg_repack --dbname=contrib_regression --index=testts1_pkey --tablespace=testts \! pg_repack --dbname=contrib_regression --index=testts1_pkey --tablespace=testts
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -194,7 +194,7 @@ ORDER BY relname;
--index tablespace stays as is --index tablespace stays as is
\! pg_repack --dbname=contrib_regression --index=testts1_pkey \! pg_repack --dbname=contrib_regression --index=testts1_pkey
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -206,7 +206,7 @@ ORDER BY relname;
--move index to pg_default --move index to pg_default
\! pg_repack --dbname=contrib_regression --index=testts1_pkey --tablespace=pg_default \! pg_repack --dbname=contrib_regression --index=testts1_pkey --tablespace=pg_default
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -217,8 +217,8 @@ ORDER BY relname;
--using multiple --index option --using multiple --index option
\! pg_repack --dbname=contrib_regression --index=testts1_pkey --index=testts1_with_idx --tablespace=testts \! pg_repack --dbname=contrib_regression --index=testts1_pkey --index=testts1_with_idx --tablespace=testts
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
INFO: repacking index "public"."testts1_with_idx" INFO: repacking index "public.testts1_with_idx"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'

View File

@ -68,7 +68,7 @@ WHERE indrelid = 'testts1'::regclass ORDER BY relname;
-- can move the tablespace from default -- can move the tablespace from default
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 --tablespace testts \! pg_repack --dbname=contrib_regression --no-order --table=testts1 --tablespace testts
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -88,7 +88,7 @@ SELECT * from testts1 order by id;
-- tablespace stays where it is -- tablespace stays where it is
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 \! pg_repack --dbname=contrib_regression --no-order --table=testts1
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -100,7 +100,7 @@ ORDER BY relname;
-- can move the ts back to default -- can move the ts back to default
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 -s pg_default \! pg_repack --dbname=contrib_regression --no-order --table=testts1 -s pg_default
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -111,7 +111,7 @@ ORDER BY relname;
-- can move the table together with the indexes -- can move the table together with the indexes
\! pg_repack --dbname=contrib_regression --no-order --table=testts1 --tablespace testts --moveidx \! pg_repack --dbname=contrib_regression --no-order --table=testts1 --tablespace testts --moveidx
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -131,13 +131,13 @@ ERROR: cannot specify --moveidx (-S) without --tablespace (-s)
ERROR: cannot specify --moveidx (-S) without --tablespace (-s) ERROR: cannot specify --moveidx (-S) without --tablespace (-s)
-- not broken with order -- not broken with order
\! pg_repack --dbname=contrib_regression -o id --table=testts1 --tablespace pg_default --moveidx \! pg_repack --dbname=contrib_regression -o id --table=testts1 --tablespace pg_default --moveidx
INFO: repacking table "testts1" INFO: repacking table "public.testts1"
--move all indexes of the table to a tablespace --move all indexes of the table to a tablespace
\! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --tablespace=testts \! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --tablespace=testts
INFO: repacking indexes of "testts1" INFO: repacking indexes of "testts1"
INFO: repacking index "public"."testts1_partial_idx" INFO: repacking index "public.testts1_partial_idx"
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
INFO: repacking index "public"."testts1_with_idx" INFO: repacking index "public.testts1_with_idx"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -152,9 +152,9 @@ ORDER BY relname;
--all indexes of tablespace remain in same tablespace --all indexes of tablespace remain in same tablespace
\! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes \! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes
INFO: repacking indexes of "testts1" INFO: repacking indexes of "testts1"
INFO: repacking index "public"."testts1_partial_idx" INFO: repacking index "public.testts1_partial_idx"
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
INFO: repacking index "public"."testts1_with_idx" INFO: repacking index "public.testts1_with_idx"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -169,9 +169,9 @@ ORDER BY relname;
--move all indexes of the table to pg_default --move all indexes of the table to pg_default
\! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --tablespace=pg_default \! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --tablespace=pg_default
INFO: repacking indexes of "testts1" INFO: repacking indexes of "testts1"
INFO: repacking index "public"."testts1_partial_idx" INFO: repacking index "public.testts1_partial_idx"
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
INFO: repacking index "public"."testts1_with_idx" INFO: repacking index "public.testts1_with_idx"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -182,7 +182,7 @@ ORDER BY relname;
--move one index to a tablespace --move one index to a tablespace
\! pg_repack --dbname=contrib_regression --index=testts1_pkey --tablespace=testts \! pg_repack --dbname=contrib_regression --index=testts1_pkey --tablespace=testts
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -194,7 +194,7 @@ ORDER BY relname;
--index tablespace stays as is --index tablespace stays as is
\! pg_repack --dbname=contrib_regression --index=testts1_pkey \! pg_repack --dbname=contrib_regression --index=testts1_pkey
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -206,7 +206,7 @@ ORDER BY relname;
--move index to pg_default --move index to pg_default
\! pg_repack --dbname=contrib_regression --index=testts1_pkey --tablespace=pg_default \! pg_repack --dbname=contrib_regression --index=testts1_pkey --tablespace=pg_default
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'
@ -217,8 +217,8 @@ ORDER BY relname;
--using multiple --index option --using multiple --index option
\! pg_repack --dbname=contrib_regression --index=testts1_pkey --index=testts1_with_idx --tablespace=testts \! pg_repack --dbname=contrib_regression --index=testts1_pkey --index=testts1_with_idx --tablespace=testts
INFO: repacking index "public"."testts1_pkey" INFO: repacking index "public.testts1_pkey"
INFO: repacking index "public"."testts1_with_idx" INFO: repacking index "public.testts1_with_idx"
SELECT relname, spcname SELECT relname, spcname
FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace FROM pg_class JOIN pg_tablespace ts ON ts.oid = reltablespace
WHERE relname ~ '^testts1' WHERE relname ~ '^testts1'