-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* uncomment tests * fix * add some more checks * uncomment vac relation listing * more checks * check external bytes * fix run tests on branch * rename tables * fix
- Loading branch information
Showing
17 changed files
with
655 additions
and
492 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,100 @@ | ||
CREATE EXTENSION yezzey; | ||
SET client_min_messages TO WARNING; | ||
-- AO | ||
CREATE TABLE regaotya(i INT, j INT) WITH (appendonly=true); | ||
INSERT INTO regaotya SELECT i,i + 1 FROM generate_series(1, 100000) i; | ||
SELECT * FROM yezzey_define_offload_policy('regaotya'); | ||
CREATE TABLE drop_column_regaotya(i INT, j INT) WITH (appendonly=true); | ||
INSERT INTO drop_column_regaotya SELECT i,i + 1 FROM generate_series(1, 100000) i; | ||
SELECT * FROM yezzey_define_offload_policy('drop_column_regaotya'); | ||
yezzey_define_offload_policy | ||
------------------------------ | ||
|
||
(1 row) | ||
|
||
SELECT reltablespace FROM pg_class where oid = 'regaotya'::regclass::oid; | ||
SELECT reltablespace FROM pg_class where oid = 'drop_column_regaotya'::regclass::oid; | ||
reltablespace | ||
--------------- | ||
8555 | ||
(1 row) | ||
|
||
SELECT count(1) from regaotya; | ||
SELECT count(1) from drop_column_regaotya; | ||
count | ||
-------- | ||
100000 | ||
(1 row) | ||
|
||
-- drop columnn | ||
ALTER TABLE regaotya DROP COLUMN j; | ||
SELECT count(1) from regaotya; | ||
ALTER TABLE drop_column_regaotya DROP COLUMN j; | ||
SELECT count(1) from drop_column_regaotya; | ||
count | ||
-------- | ||
100000 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status('regaotya'); | ||
SELECT count() FROM yezzey_offload_relation_status('drop_column_regaotya'); | ||
count | ||
------- | ||
3 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status_per_filesegment('regaotya'); | ||
SELECT count() FROM yezzey_offload_relation_status_per_filesegment('drop_column_regaotya'); | ||
count | ||
------- | ||
3 | ||
(1 row) | ||
|
||
--SELECT count() FROM yezzey_relation_describe_external_storage_structure('regaotya'); | ||
DROP TABLE regaotya; | ||
SELECT count(), sum(external_bytes) FROM yezzey_relation_describe_external_storage_structure('drop_column_regaotya'); | ||
count | sum | ||
-------+--------- | ||
3 | 1802048 | ||
(1 row) | ||
|
||
DROP TABLE drop_column_regaotya; | ||
-- AOCS | ||
CREATE TABLE regaocstya(i INT, j INT) WITH (appendonly=true, orientation=column); | ||
INSERT INTO regaocstya SELECT i,i + 1 FROM generate_series(1, 100000) i; | ||
SELECT * FROM yezzey_define_offload_policy('regaocstya'); | ||
CREATE TABLE drop_column_regaocstya(i INT, j INT) WITH (appendonly=true, orientation=column); | ||
INSERT INTO drop_column_regaocstya SELECT i,i + 1 FROM generate_series(1, 100000) i; | ||
SELECT * FROM yezzey_define_offload_policy('drop_column_regaocstya'); | ||
yezzey_define_offload_policy | ||
------------------------------ | ||
|
||
(1 row) | ||
|
||
SELECT reltablespace FROM pg_class where oid = 'regaocstya'::regclass::oid; | ||
SELECT reltablespace FROM pg_class where oid = 'drop_column_regaocstya'::regclass::oid; | ||
reltablespace | ||
--------------- | ||
8555 | ||
(1 row) | ||
|
||
SELECT count(1) from regaocstya; | ||
SELECT count(1) from drop_column_regaocstya; | ||
count | ||
-------- | ||
100000 | ||
(1 row) | ||
|
||
-- drop columnn | ||
ALTER TABLE regaocstya DROP COLUMN j; | ||
SELECT count(1) from regaocstya; | ||
ALTER TABLE drop_column_regaocstya DROP COLUMN j; | ||
SELECT count(1) from drop_column_regaocstya; | ||
count | ||
-------- | ||
100000 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status('regaocstya'); | ||
SELECT count() FROM yezzey_offload_relation_status('drop_column_regaocstya'); | ||
count | ||
------- | ||
3 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status_per_filesegment('regaocstya'); | ||
SELECT count() FROM yezzey_offload_relation_status_per_filesegment('drop_column_regaocstya'); | ||
count | ||
------- | ||
6 | ||
(1 row) | ||
|
||
--SELECT count() FROM yezzey_relation_describe_external_storage_structure('regaocstya'); | ||
DROP TABLE regaocstya; | ||
SELECT count(), sum(external_bytes) FROM yezzey_relation_describe_external_storage_structure('drop_column_regaocstya'); | ||
count | sum | ||
-------+-------- | ||
6 | 801312 | ||
(1 row) | ||
|
||
DROP TABLE drop_column_regaocstya; | ||
DROP EXTENSION yezzey; | ||
CHECKPOINT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.