1
I developed a web application with Python
and Django
. I would like to limit the amount of space used for each user, because in the application it is possible to insert images and documents.
I use Postgres as DBMS.
How do I know the amount of storage occupied by a user in Python and Django?
Including all overhead that DBMS uses or only net user data?
– anonimo
Both cases, overhead and also net data.
– Rafael
Start studying here: https://www.postgresql.org/docs/current/storage.html. You will need to study in depth.
– anonimo
According to Django’s documentation, storing images in the DBMS is not a good idea, Heim!
– Sidon
I am only storing the image address on SGBD @Sidon
– Rafael
So why worry about space? if you need to worry about it or there is something wrong or the system is unviable. :-)
– Sidon
Because as I described in the question, I want to LIMIT the space of every user that uses my system. Unless you provide me with a server with unlimited, free storage space, then worrying about space is indispensable :-) @Sidon
– Rafael
You quoted the DBMS, and the space occupied by strings in the DBMS is insignificant, it should not be limited to this space but climb if necessary. Now... if you’re talking about the storage space on the File System, that’s another story, the quotas of space per user should be determined by the Infra admin and not by your app and, finally, If you are storing image type artifacts in the same FS in which you deploy your app, I suggest rethinking the strategy, tb is not a good idea.
– Sidon