diff --git a/src/test/regress/expected/multi_size_queries.out b/src/test/regress/expected/multi_size_queries.out index b4ec7fb43..2e0212a45 100644 --- a/src/test/regress/expected/multi_size_queries.out +++ b/src/test/regress/expected/multi_size_queries.out @@ -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? --------------------------------------------------------------------- diff --git a/src/test/regress/sql/multi_size_queries.sql b/src/test/regress/sql/multi_size_queries.sql index b431e751d..8476a612a 100644 --- a/src/test/regress/sql/multi_size_queries.sql +++ b/src/test/regress/sql/multi_size_queries.sql @@ -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;