forked from greenplum-db/diskquota-archive
-
Notifications
You must be signed in to change notification settings - Fork 2
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
5 changed files
with
117 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
1: CREATE SCHEMA dropped_schema; | ||
CREATE | ||
1: SET search_path TO dropped_schema; | ||
SET | ||
1: SELECT diskquota.set_schema_quota('dropped_schema', '1 MB'); | ||
set_schema_quota | ||
------------------ | ||
|
||
(1 row) | ||
1: SELECT diskquota.wait_for_worker_new_epoch(); | ||
wait_for_worker_new_epoch | ||
--------------------------- | ||
t | ||
(1 row) | ||
1: CREATE TABLE dropped_table(id int) DISTRIBUTED BY (id); | ||
CREATE | ||
1: INSERT INTO dropped_table SELECT generate_series(1, 100000); | ||
INSERT 100000 | ||
1: SELECT diskquota.wait_for_worker_new_epoch(); | ||
wait_for_worker_new_epoch | ||
--------------------------- | ||
t | ||
(1 row) | ||
1: DROP TABLE dropped_table; | ||
DROP | ||
1q: ... <quitting> | ||
|
||
!\retcode gpstop -afr; | ||
-- start_ignore | ||
-- end_ignore | ||
(exited with code 0) | ||
|
||
1: SELECT pg_table_size('dropped_table'::regclass::oid) size; | ||
ERROR: relation "dropped_table" does not exist | ||
LINE 1: SELECT pg_table_size('dropped_table'::regclass::oid) size; | ||
^ | ||
1: SELECT size FROM diskquota.table_size WHERE NOT EXISTS (SELECT 1 FROM pg_class WHERE tableid = oid) AND segid = -1; | ||
size | ||
------ | ||
(0 rows) | ||
1: DROP SCHEMA dropped_schema CASCADE; | ||
DROP | ||
1q: ... <quitting> |
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,41 @@ | ||
1: CREATE SCHEMA temporary_schema; | ||
CREATE | ||
1: SET search_path TO temporary_schema; | ||
SET | ||
1: SELECT diskquota.set_schema_quota('temporary_schema', '1 MB'); | ||
set_schema_quota | ||
------------------ | ||
|
||
(1 row) | ||
1: SELECT diskquota.wait_for_worker_new_epoch(); | ||
wait_for_worker_new_epoch | ||
--------------------------- | ||
t | ||
(1 row) | ||
1: CREATE TEMPORARY TABLE temporary_table(id int) DISTRIBUTED BY (id); | ||
CREATE | ||
1: INSERT INTO temporary_table SELECT generate_series(1, 100000); | ||
INSERT 100000 | ||
1: SELECT diskquota.wait_for_worker_new_epoch(); | ||
wait_for_worker_new_epoch | ||
--------------------------- | ||
t | ||
(1 row) | ||
1q: ... <quitting> | ||
|
||
!\retcode gpstop -afr; | ||
-- start_ignore | ||
-- end_ignore | ||
(exited with code 0) | ||
|
||
1: SELECT pg_table_size('temporary_table'::regclass::oid) size; | ||
ERROR: relation "temporary_table" does not exist | ||
LINE 1: SELECT pg_table_size('temporary_table'::regclass::oid) size; | ||
^ | ||
1: SELECT size FROM diskquota.table_size WHERE NOT EXISTS (SELECT 1 FROM pg_class WHERE tableid = oid) AND segid = -1; | ||
size | ||
------ | ||
(0 rows) | ||
1: DROP SCHEMA temporary_schema CASCADE; | ||
DROP | ||
1q: ... <quitting> |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
1: CREATE SCHEMA dropped_schema; | ||
1: SET search_path TO dropped_schema; | ||
1: SELECT diskquota.set_schema_quota('dropped_schema', '1 MB'); | ||
1: SELECT diskquota.wait_for_worker_new_epoch(); | ||
1: CREATE TABLE dropped_table(id int) DISTRIBUTED BY (id); | ||
1: INSERT INTO dropped_table SELECT generate_series(1, 100000); | ||
1: SELECT diskquota.wait_for_worker_new_epoch(); | ||
1: DROP TABLE dropped_table; | ||
1q: | ||
|
||
!\retcode gpstop -afr; | ||
|
||
1: SELECT pg_table_size('dropped_table'::regclass::oid) size; | ||
1: SELECT size FROM diskquota.table_size WHERE NOT EXISTS (SELECT 1 FROM pg_class WHERE tableid = oid) AND segid = -1; | ||
1: DROP SCHEMA dropped_schema CASCADE; | ||
1q: |
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,15 @@ | ||
1: CREATE SCHEMA temporary_schema; | ||
1: SET search_path TO temporary_schema; | ||
1: SELECT diskquota.set_schema_quota('temporary_schema', '1 MB'); | ||
1: SELECT diskquota.wait_for_worker_new_epoch(); | ||
1: CREATE TEMPORARY TABLE temporary_table(id int) DISTRIBUTED BY (id); | ||
1: INSERT INTO temporary_table SELECT generate_series(1, 100000); | ||
1: SELECT diskquota.wait_for_worker_new_epoch(); | ||
1q: | ||
|
||
!\retcode gpstop -afr; | ||
|
||
1: SELECT pg_table_size('temporary_table'::regclass::oid) size; | ||
1: SELECT size FROM diskquota.table_size WHERE NOT EXISTS (SELECT 1 FROM pg_class WHERE tableid = oid) AND segid = -1; | ||
1: DROP SCHEMA temporary_schema CASCADE; | ||
1q: |