-
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.
- Loading branch information
Showing
13 changed files
with
701 additions
and
215 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,90 @@ | ||
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'); | ||
yezzey_define_offload_policy | ||
------------------------------ | ||
|
||
(1 row) | ||
|
||
SELECT reltablespace FROM pg_class where oid = 'regaotya'::regclass::oid; | ||
reltablespace | ||
--------------- | ||
8555 | ||
(1 row) | ||
|
||
SELECT count(1) from regaotya; | ||
count | ||
-------- | ||
100000 | ||
(1 row) | ||
|
||
-- drop columnn | ||
ALTER TABLE regaotya DROP COLUMN j; | ||
SELECT count(1) from regaotya; | ||
count | ||
-------- | ||
100000 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status('regaotya'); | ||
count | ||
------- | ||
3 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status_per_filesegment('regaotya'); | ||
count | ||
------- | ||
3 | ||
(1 row) | ||
|
||
--SELECT count() FROM yezzey_relation_describe_external_storage_structure('regaotya'); | ||
DROP TABLE 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'); | ||
yezzey_define_offload_policy | ||
------------------------------ | ||
|
||
(1 row) | ||
|
||
SELECT reltablespace FROM pg_class where oid = 'regaocstya'::regclass::oid; | ||
reltablespace | ||
--------------- | ||
8555 | ||
(1 row) | ||
|
||
SELECT count(1) from regaocstya; | ||
count | ||
-------- | ||
100000 | ||
(1 row) | ||
|
||
-- drop columnn | ||
ALTER TABLE regaocstya DROP COLUMN j; | ||
SELECT count(1) from regaocstya; | ||
count | ||
-------- | ||
100000 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status('regaocstya'); | ||
count | ||
------- | ||
3 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status_per_filesegment('regaocstya'); | ||
count | ||
------- | ||
6 | ||
(1 row) | ||
|
||
--SELECT count() FROM yezzey_relation_describe_external_storage_structure('regaocstya'); | ||
DROP TABLE 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
CREATE EXTENSION yezzey; | ||
SET client_min_messages TO WARNING; | ||
-- AO | ||
CREATE TABLE regaoty(i INT) WITH (appendonly=true); | ||
INSERT INTO regaoty SELECT * FROM generate_series(1, 100000); | ||
SELECT * FROM yezzey_define_offload_policy('regaoty'); | ||
yezzey_define_offload_policy | ||
------------------------------ | ||
|
||
(1 row) | ||
|
||
SELECT reltablespace FROM pg_class where oid = 'regaoty'::regclass::oid; | ||
reltablespace | ||
--------------- | ||
8555 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status('regaoty'); | ||
count | ||
------- | ||
3 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status_per_filesegment('regaoty'); | ||
count | ||
------- | ||
3 | ||
(1 row) | ||
|
||
--SELECT count() FROM yezzey_relation_describe_external_storage_structure('regaoty'); | ||
SELECT count(1) FROM regaoty; | ||
count | ||
-------- | ||
100000 | ||
(1 row) | ||
|
||
INSERT INTO regaoty SELECT * FROM generate_series(1, 100000); | ||
SELECT count(1) FROM regaoty; | ||
count | ||
-------- | ||
200000 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status('regaoty'); | ||
count | ||
------- | ||
3 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status_per_filesegment('regaoty'); | ||
count | ||
------- | ||
3 | ||
(1 row) | ||
|
||
--SELECT count() FROM yezzey_relation_describe_external_storage_structure('regaoty'); | ||
DELETE FROM regaoty; | ||
INSERT INTO regaoty SELECT * FROM generate_series(1, 100000); | ||
INSERT INTO regaoty SELECT * FROM generate_series(1, 100000); | ||
SELECT count(1) FROM regaoty; | ||
count | ||
-------- | ||
200000 | ||
(1 row) | ||
|
||
ALTER TABLE regaoty SET DISTRIBUTED RANDOMLY; | ||
SELECT count(1) FROM regaoty; | ||
count | ||
-------- | ||
200000 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status('regaoty'); | ||
count | ||
------- | ||
3 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status_per_filesegment('regaoty'); | ||
count | ||
------- | ||
3 | ||
(1 row) | ||
|
||
--SELECT count() FROM yezzey_relation_describe_external_storage_structure('regaoty'); | ||
DROP TABLE regaoty; | ||
\! echo AO simple test OK | ||
AO simple test OK | ||
-- AOCS | ||
CREATE TABLE regaocsty(i INT) WITH (appendonly=true, orientation=column); | ||
INSERT INTO regaocsty SELECT * FROM generate_series(1, 100000); | ||
SELECT * FROM yezzey_define_offload_policy('regaocsty'); | ||
yezzey_define_offload_policy | ||
------------------------------ | ||
|
||
(1 row) | ||
|
||
SELECT reltablespace FROM pg_class where oid = 'regaocsty'::regclass::oid; | ||
reltablespace | ||
--------------- | ||
8555 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status('regaocsty'); | ||
count | ||
------- | ||
3 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status_per_filesegment('regaocsty'); | ||
count | ||
------- | ||
3 | ||
(1 row) | ||
|
||
--SELECT count() FROM yezzey_relation_describe_external_storage_structure('regaocsty'); | ||
SELECT count(1) FROM regaocsty; | ||
count | ||
-------- | ||
100000 | ||
(1 row) | ||
|
||
INSERT INTO regaocsty SELECT * FROM generate_series(1, 100000); | ||
SELECT count(1) FROM regaocsty; | ||
count | ||
-------- | ||
200000 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status('regaocsty'); | ||
count | ||
------- | ||
3 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status_per_filesegment('regaocsty'); | ||
count | ||
------- | ||
3 | ||
(1 row) | ||
|
||
--SELECT count() FROM yezzey_relation_describe_external_storage_structure('regaocsty'); | ||
DELETE FROM regaocsty; | ||
INSERT INTO regaocsty SELECT * FROM generate_series(1, 100000); | ||
INSERT INTO regaocsty SELECT * FROM generate_series(1, 100000); | ||
SELECT count(1) FROM regaocsty; | ||
count | ||
-------- | ||
200000 | ||
(1 row) | ||
|
||
ALTER TABLE regaoty SET DISTRIBUTED RANDOMLY; | ||
ERROR: relation "regaoty" does not exist | ||
SELECT count(1) FROM regaocsty; | ||
count | ||
-------- | ||
200000 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status('regaocsty'); | ||
count | ||
------- | ||
3 | ||
(1 row) | ||
|
||
SELECT count() FROM yezzey_offload_relation_status_per_filesegment('regaocsty'); | ||
count | ||
------- | ||
3 | ||
(1 row) | ||
|
||
--SELECT count() FROM yezzey_relation_describe_external_storage_structure('regaocsty'); | ||
DROP TABLE regaocsty; | ||
\! echo AOCS simple test OK | ||
AOCS simple test OK | ||
DROP EXTENSION yezzey; | ||
CHECKPOINT; |
Oops, something went wrong.