I have a PostgreSQL database. One table is very large. I want to extract a TEXT column into a separate table and see how much I can reduce the size. The problem is that the size appears to stay the same no matter what I do.
I'm obtaining the size by issuing \dt+
in psql.
I've tried VACUUM FULL
and dp_dumpall
followed by deleting the database and restoring it.
The size of the table did not change.
I added a second TEXT column, watched the size increase by a few hundred MB, deleted the column, and I cannot get the size to go down again.
How can I get the size of the table to go down after deleting these columns?
VACUUM FULL
rewrites the table. If there's less data in the table then it would've shrunk. Did you actuallyDROP
the column? Are you sure you vacuumed the right column? – Craig Ringer Dec 13 '15 at 9:47