mirror of https://github.com/citusdata/citus.git
fix
parent
61f16555b2
commit
b3082fa468
|
@ -37,15 +37,13 @@ SELECT replicate_table_shards('lineitem_hash_part', shard_replication_factor:=2,
|
|||
|
||||
-- Tests on distributed table with replication factor > 1
|
||||
VACUUM (FULL) lineitem_hash_part;
|
||||
-- citus_table_size, citus_relation_size and citus_total_relation_size should return the same value
|
||||
-- and that value should be greater than 0
|
||||
SELECT citus_table_size('lineitem_hash_part') = citus_relation_size('lineitem_hash_part');
|
||||
SELECT citus_table_size('lineitem_hash_part') <= citus_relation_size('lineitem_hash_part');
|
||||
?column?
|
||||
---------------------------------------------------------------------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
SELECT citus_relation_size('lineitem_hash_part') = citus_total_relation_size('lineitem_hash_part');
|
||||
SELECT citus_relation_size('lineitem_hash_part') <= citus_total_relation_size('lineitem_hash_part');
|
||||
?column?
|
||||
---------------------------------------------------------------------
|
||||
t
|
||||
|
@ -59,9 +57,13 @@ SELECT citus_table_size('lineitem_hash_part') > 0;
|
|||
|
||||
CREATE INDEX lineitem_hash_part_idx ON lineitem_hash_part(l_orderkey);
|
||||
VACUUM (FULL) lineitem_hash_part;
|
||||
-- citus_table_size and citus_relation_size should return the same value
|
||||
-- and that value should be greater than 0
|
||||
SELECT citus_table_size('lineitem_hash_part') = citus_relation_size('lineitem_hash_part');
|
||||
SELECT citus_table_size('lineitem_hash_part') <= citus_relation_size('lineitem_hash_part');
|
||||
?column?
|
||||
---------------------------------------------------------------------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
SELECT citus_relation_size('lineitem_hash_part') <= citus_total_relation_size('lineitem_hash_part');
|
||||
?column?
|
||||
---------------------------------------------------------------------
|
||||
t
|
||||
|
@ -73,15 +75,13 @@ SELECT citus_table_size('lineitem_hash_part') > 0;
|
|||
t
|
||||
(1 row)
|
||||
|
||||
-- citus_table_size, citus_relation_size and citus_total_relation_size should return the same value
|
||||
-- and that value should be greater than 0
|
||||
SELECT citus_table_size('lineitem_hash_part_idx') = citus_relation_size('lineitem_hash_part_idx');
|
||||
SELECT citus_table_size('lineitem_hash_part_idx') <= citus_relation_size('lineitem_hash_part_idx');
|
||||
?column?
|
||||
---------------------------------------------------------------------
|
||||
t
|
||||
(1 row)
|
||||
|
||||
SELECT citus_table_size('lineitem_hash_part_idx') = citus_total_relation_size('lineitem_hash_part_idx');
|
||||
SELECT citus_relation_size('lineitem_hash_part_idx') <= citus_total_relation_size('lineitem_hash_part_idx');
|
||||
?column?
|
||||
---------------------------------------------------------------------
|
||||
t
|
||||
|
@ -93,8 +93,7 @@ SELECT citus_table_size('lineitem_hash_part_idx') > 0;
|
|||
t
|
||||
(1 row)
|
||||
|
||||
-- citus_total_relation_size should return the sum of table & index size
|
||||
SELECT citus_total_relation_size('lineitem_hash_part') =
|
||||
SELECT citus_total_relation_size('lineitem_hash_part') >=
|
||||
citus_table_size('lineitem_hash_part') + citus_table_size('lineitem_hash_part_idx');
|
||||
?column?
|
||||
---------------------------------------------------------------------
|
||||
|
|
|
@ -31,28 +31,22 @@ SELECT replicate_table_shards('lineitem_hash_part', shard_replication_factor:=2,
|
|||
-- Tests on distributed table with replication factor > 1
|
||||
VACUUM (FULL) lineitem_hash_part;
|
||||
|
||||
-- citus_table_size, citus_relation_size and citus_total_relation_size should return the same value
|
||||
-- and that value should be greater than 0
|
||||
SELECT citus_table_size('lineitem_hash_part') = citus_relation_size('lineitem_hash_part');
|
||||
SELECT citus_relation_size('lineitem_hash_part') = citus_total_relation_size('lineitem_hash_part');
|
||||
SELECT citus_table_size('lineitem_hash_part') <= citus_relation_size('lineitem_hash_part');
|
||||
SELECT citus_relation_size('lineitem_hash_part') <= citus_total_relation_size('lineitem_hash_part');
|
||||
SELECT citus_table_size('lineitem_hash_part') > 0;
|
||||
|
||||
CREATE INDEX lineitem_hash_part_idx ON lineitem_hash_part(l_orderkey);
|
||||
VACUUM (FULL) lineitem_hash_part;
|
||||
|
||||
-- citus_table_size and citus_relation_size should return the same value
|
||||
-- and that value should be greater than 0
|
||||
SELECT citus_table_size('lineitem_hash_part') = citus_relation_size('lineitem_hash_part');
|
||||
SELECT citus_table_size('lineitem_hash_part') <= citus_relation_size('lineitem_hash_part');
|
||||
SELECT citus_relation_size('lineitem_hash_part') <= citus_total_relation_size('lineitem_hash_part');
|
||||
SELECT citus_table_size('lineitem_hash_part') > 0;
|
||||
|
||||
-- citus_table_size, citus_relation_size and citus_total_relation_size should return the same value
|
||||
-- and that value should be greater than 0
|
||||
SELECT citus_table_size('lineitem_hash_part_idx') = citus_relation_size('lineitem_hash_part_idx');
|
||||
SELECT citus_table_size('lineitem_hash_part_idx') = citus_total_relation_size('lineitem_hash_part_idx');
|
||||
SELECT citus_table_size('lineitem_hash_part_idx') <= citus_relation_size('lineitem_hash_part_idx');
|
||||
SELECT citus_relation_size('lineitem_hash_part_idx') <= citus_total_relation_size('lineitem_hash_part_idx');
|
||||
SELECT citus_table_size('lineitem_hash_part_idx') > 0;
|
||||
|
||||
-- citus_total_relation_size should return the sum of table & index size
|
||||
SELECT citus_total_relation_size('lineitem_hash_part') =
|
||||
SELECT citus_total_relation_size('lineitem_hash_part') >=
|
||||
citus_table_size('lineitem_hash_part') + citus_table_size('lineitem_hash_part_idx');
|
||||
|
||||
DROP INDEX lineitem_hash_part_idx;
|
||||
|
|
Loading…
Reference in New Issue