Limit database size


#1

Hello. I would like to create a database for some of our users to use as a data lab where they can upload and transform their own data. However, I’m concerned what would happen to the cluster, for example, if they tried to store a query result with a missed join into a table where it would it consume all of the memory and/or disk. Is there a way to limit database size or otherwise mitigate this issue besides creating another cluster?


#2

Sorry, I don’t have an easy solution to offer you right now. We’re considering disk and memory quotas for a future release to deal with this need.

One thing you can do is make sure that maximum_table_memory is not too close to maximum_memory to give yourself headroom to correct an out-of-memory condition by temporarily raising maximum_table_memory or running large DELETE statements (e.g. keep them 20% apart). Similarly, you many be able to use the OS file system to set quotas or otherwise limit the capacity of the MemSQL data directories, but of course that won’t let you simulate user-level quotas.