mirror of https://github.com/citusdata/citus.git
Add a test which checks for resource clean-up
parent
7cc8c8c155
commit
eeb25aca85
|
@ -1,3 +1,4 @@
|
||||||
|
SELECT count(*) AS columnar_table_count FROM cstore.cstore_tables \gset
|
||||||
CREATE TABLE t(a int, b int) USING cstore_tableam;
|
CREATE TABLE t(a int, b int) USING cstore_tableam;
|
||||||
SELECT count(*) FROM cstore.cstore_stripes a, pg_class b WHERE a.relfilenode=b.relfilenode AND b.relname='t';
|
SELECT count(*) FROM cstore.cstore_stripes a, pg_class b WHERE a.relfilenode=b.relfilenode AND b.relname='t';
|
||||||
count
|
count
|
||||||
|
@ -87,3 +88,18 @@ SELECT stripe, attr, block, minimum_value IS NULL, maximum_value IS NULL FROM cs
|
||||||
2 | 2 | 0 | f | f
|
2 | 2 | 0 | f | f
|
||||||
(6 rows)
|
(6 rows)
|
||||||
|
|
||||||
|
-- Make sure we cleaned-up the transient table metadata after VACUUM FULL commands
|
||||||
|
SELECT count(*) - :columnar_table_count FROM cstore.cstore_tables;
|
||||||
|
?column?
|
||||||
|
----------
|
||||||
|
1
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
DROP TABLE t;
|
||||||
|
-- Make sure we cleaned the metadata for t too
|
||||||
|
SELECT count(*) - :columnar_table_count FROM cstore.cstore_tables;
|
||||||
|
?column?
|
||||||
|
----------
|
||||||
|
0
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
|
SELECT count(*) AS columnar_table_count FROM cstore.cstore_tables \gset
|
||||||
|
|
||||||
CREATE TABLE t(a int, b int) USING cstore_tableam;
|
CREATE TABLE t(a int, b int) USING cstore_tableam;
|
||||||
|
|
||||||
SELECT count(*) FROM cstore.cstore_stripes a, pg_class b WHERE a.relfilenode=b.relfilenode AND b.relname='t';
|
SELECT count(*) FROM cstore.cstore_stripes a, pg_class b WHERE a.relfilenode=b.relfilenode AND b.relname='t';
|
||||||
|
|
||||||
INSERT INTO t SELECT i, i * i FROM generate_series(1, 10) i;
|
INSERT INTO t SELECT i, i * i FROM generate_series(1, 10) i;
|
||||||
|
@ -35,3 +38,10 @@ VACUUM FULL t;
|
||||||
|
|
||||||
SELECT stripe, attr, block, minimum_value IS NULL, maximum_value IS NULL FROM cstore.cstore_skipnodes a, pg_class b WHERE a.relfilenode=b.relfilenode AND b.relname='t' ORDER BY 1, 2, 3;
|
SELECT stripe, attr, block, minimum_value IS NULL, maximum_value IS NULL FROM cstore.cstore_skipnodes a, pg_class b WHERE a.relfilenode=b.relfilenode AND b.relname='t' ORDER BY 1, 2, 3;
|
||||||
|
|
||||||
|
-- Make sure we cleaned-up the transient table metadata after VACUUM FULL commands
|
||||||
|
SELECT count(*) - :columnar_table_count FROM cstore.cstore_tables;
|
||||||
|
|
||||||
|
DROP TABLE t;
|
||||||
|
|
||||||
|
-- Make sure we cleaned the metadata for t too
|
||||||
|
SELECT count(*) - :columnar_table_count FROM cstore.cstore_tables;
|
||||||
|
|
Loading…
Reference in New Issue