blob: 4d82eb88b2ec6498c9bed0f5d3bb1cc18e57def2 [file] [log] [blame]
-- @Description Ensures that an alter table while a vacuum operation is ok
--
CREATE TABLE alter_while_vacuum_@amname@ (a INT, b INT) USING @amname@;
INSERT INTO alter_while_vacuum_@amname@ SELECT i as a, i as b FROM generate_series(1, 100000) AS i;
DELETE FROM alter_while_vacuum_@amname@ WHERE a < 12000;
1: SELECT COUNT(*) FROM alter_while_vacuum_@amname@;
1>: ALTER TABLE alter_while_vacuum_@amname@ ADD COLUMN d bigint DEFAULT 10;
2: VACUUM alter_while_vacuum_@amname@;
1<:
1: SELECT * FROM alter_while_vacuum_@amname@ WHERE a < 12010;