blob: 336b709e1a29ba5d7fff2d617b0d8b29c0c968d9 [file] [log] [blame]
-- @Description Tests the compaction of data inserted in utility mode
--
DROP TABLE IF EXISTS foo;
CREATE TABLE foo (a INT, b INT, c CHAR(128)) USING @amname@ distributed randomly;
CREATE INDEX foo_index ON foo(b);
0U: INSERT INTO foo VALUES (2, 2, 'c');
0U: INSERT INTO foo VALUES (3, 3, 'c');
SELECT *, segno, tupcount, state FROM gp_ao_or_aocs_seg('foo');
DELETE FROM foo WHERE a = 2;
UPDATE foo SET b = -1 WHERE a = 3;
VACUUM foo;
SELECT segment_id, segno, tupcount, state FROM gp_ao_or_aocs_seg('foo') where state = 1 and tupcount > 0;