I need to make some changes to one of the tables to add new columns. The problem is that I can not at all. I get the following error:
PG: DiskFull: ERROR: could not extend file "base / 1672994 / 5557167.4": No space left on device. HINT: Check free disk space.
Well, there is no doubt that I need to increase my disk space, since not even a VACUUM FULL
operation worked, presenting this same problem.
The query I tried to do is as follows:
ALTER TABLE messages ADD COLUMN readed BOOLEAN DEFAULT FALSE;
It's a simple field, and boolean does not take up much space. But reading on other forums, I saw something related to the fact that PG needs more room to do such an operation. I'm not sure how it works, but this table I'm trying to change has over 6,700,000 rows, and taking that into account, it might make sense that the current slot is not enough for the operation.
But anyway. What I want to know is: Is there a way for me to calculate on average how much additional space I'll need to buy for this operation to work? And how does this ALTER TABLE
issue work? Do you really need a lot more room to work?