Setup:
- Django (2.2.18) and Postgres (9.5) in one server, same disk.
- Migrations are altering 1 table (adding and removing fields).
I'm not sure if my question is correct but I ran into a problem with my setup above while applying migrations. Error is from psycopg2:
DiskFull: could not extend file "base/167296/1842042": wrote only 4096 of 8192 bytes at block 161
HINT: Check free disk space.
Current disk usage is 14G out of 20G. We resolved the issue by deleting a few files and running the migrations again. We observed that the disk usage temporarily increased to about 96% of 20G then went back to 14G. Now we need to do something so the issue doesn't happen again. My question is:
- if we move the database to something like
RDS
, will it be enough?
I ask because I'm not sure if it's the database size that temporarily inflates or if it's django that creates temporary files on disk. In the second case, it would mean that moving the database will not actually solve the issue.
I'd appreciate references as I couldn't find anything on this on the django docs (or I'm blind).