Add new vacuum regression test files.
This commit is contained in:
parent
e77054e029
commit
aec814b548
59
src/test/regress/expected/vacuum.out
Normal file
59
src/test/regress/expected/vacuum.out
Normal file
@ -0,0 +1,59 @@
|
||||
--
|
||||
-- VACUUM
|
||||
--
|
||||
CREATE TABLE vactst (i INT);
|
||||
INSERT INTO vactst VALUES (1);
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst VALUES (0);
|
||||
SELECT count(*) FROM vactst;
|
||||
count
|
||||
-------
|
||||
2049
|
||||
(1 row)
|
||||
|
||||
DELETE FROM vactst WHERE i != 0;
|
||||
SELECT * FROM vactst;
|
||||
i
|
||||
---
|
||||
0
|
||||
(1 row)
|
||||
|
||||
VACUUM FULL vactst;
|
||||
UPDATE vactst SET i = i + 1;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst VALUES (0);
|
||||
SELECT count(*) FROM vactst;
|
||||
count
|
||||
-------
|
||||
2049
|
||||
(1 row)
|
||||
|
||||
DELETE FROM vactst WHERE i != 0;
|
||||
VACUUM FULL vactst;
|
||||
DELETE FROM vactst;
|
||||
SELECT * FROM vactst;
|
||||
i
|
||||
---
|
||||
(0 rows)
|
||||
|
||||
DROP TABLE vactst;
|
42
src/test/regress/sql/vacuum.sql
Normal file
42
src/test/regress/sql/vacuum.sql
Normal file
@ -0,0 +1,42 @@
|
||||
--
|
||||
-- VACUUM
|
||||
--
|
||||
|
||||
CREATE TABLE vactst (i INT);
|
||||
INSERT INTO vactst VALUES (1);
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst VALUES (0);
|
||||
SELECT count(*) FROM vactst;
|
||||
DELETE FROM vactst WHERE i != 0;
|
||||
SELECT * FROM vactst;
|
||||
VACUUM FULL vactst;
|
||||
UPDATE vactst SET i = i + 1;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst SELECT * FROM vactst;
|
||||
INSERT INTO vactst VALUES (0);
|
||||
SELECT count(*) FROM vactst;
|
||||
DELETE FROM vactst WHERE i != 0;
|
||||
VACUUM FULL vactst;
|
||||
DELETE FROM vactst;
|
||||
SELECT * FROM vactst;
|
||||
|
||||
DROP TABLE vactst;
|
Loading…
Reference in New Issue
Block a user