Skip to content

Commit

Permalink
Add test for vacuum completion
Browse files Browse the repository at this point in the history
  • Loading branch information
JerrySievert committed Jan 9, 2024
1 parent d5f6e8e commit b28144e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
7 changes: 7 additions & 0 deletions columnar/src/test/regress/expected/columnar_vacuum.out
Original file line number Diff line number Diff line change
Expand Up @@ -441,3 +441,10 @@ SELECT COUNT(*) = (:columnar_row_mask_rows / 2) FROM columnar.row_mask WHERE sto
(1 row)

DROP TABLE t;
-- Verify that we can vacuum humongous fields
CREATE TABLE t (id SERIAL, data TEXT) USING columnar;
INSERT INTO t SELECT 1, repeat('a', 1000000000);
INSERT INTO t SELECT 2, repeat('b', 1000000000);
INSERT INTO t SELECT 3, repeat('c', 1000000000);
VACUUM t;
DROP TABLE t;
12 changes: 11 additions & 1 deletion columnar/src/test/regress/sql/columnar_vacuum.sql
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,14 @@ VACUUM t;
SELECT COUNT(*) = (:columnar_chunk_group_rows / 2) FROM columnar.chunk_group WHERE storage_id = :t_oid;
SELECT COUNT(*) = (:columnar_row_mask_rows / 2) FROM columnar.row_mask WHERE storage_id = :t_oid;

DROP TABLE t;
DROP TABLE t;

-- Verify that we can vacuum humongous fields
CREATE TABLE t (id SERIAL, data TEXT) USING columnar;
INSERT INTO t SELECT 1, repeat('a', 1000000000);
INSERT INTO t SELECT 2, repeat('b', 1000000000);
INSERT INTO t SELECT 3, repeat('c', 1000000000);

VACUUM t;

DROP TABLE t;

0 comments on commit b28144e

Please sign in to comment.