1

How can I delete all stored records of my PostgreSQL data in CentOS 7 machine?

Previously I inserted 10 million rows of data with 12 columns, and I ran into storage issues, so I dropped the tables that had 10 million rows of data. But dropping those tables cleared space for only 11GB, and I'm not sure if dropping table is the right way to clear space on CentOS 7 system. The data was previously in /dev/mapper/centos-root

df -h

enter image description here

pvs, vgs, lvs

enter image description here

Moreover, I don't understand How pvs and vgs says that I only have 4MB of free space, when df -h says that I have 11GB available.

Did I clear the space correctly by dropping tables in DB? Or should I take some more advanced methods?

1 Answer 1

0

I think you might need the VACUUM command

https://www.postgresql.org/docs/9.5/static/sql-vacuum.html

VACUUM reclaims storage occupied by dead tuples. In normal PostgreSQL operation, tuples that are deleted or obsoleted by an update are not physically removed from their table; they remain present until a VACUUM is done. Therefore it's necessary to do VACUUM periodically, especially on frequently-updated tables.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.