Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit the amount of disk space that a table can use. #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BaiShaoqi
Copy link

@BaiShaoqi BaiShaoqi commented Aug 22, 2018

Main purpose is to limit a table usage of disk space. and use pg_total_relation_size function to calcuate a table size.

load quota and refresh fs in one function load_quotas_refresh_fs_model.
Main logic is following
SPI_execute("select relationid, pg_total_relation_size(relationid) int8, quota int8 from quota.config", true, 0);

Have a question I would like to consult you, on applying disk quota on greenplum, you have said in README:

Quotas are only checked at the beginning of INSERT and COPY statements.
As long as the user has not exceeded the quota at the beginning of the
statement, the INSERT or COPY is allowed to go through, even if it
causes the quota to be exceeded.

how can greenplum overcome the weakness: allow COPY to cancel on the progress once disk usage is higher than quota not after the query has done, would like to hear your ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant