Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Postgres free space problem


7:23 am on Apr 9, 2010 (gmt 0)

New User

10+ Year Member

joined:Oct 19, 2005
posts: 34
votes: 0


I am new in PostgreSQL and I did the following. I removed around 3 out of 5 million records from one table and then I did vacuum analyze, then I checked that table in pg admin the estimate row count was 13 million instead of 2 millions that it must be. Why is that? I did this records removal to free up some space but instead my space was limited even more. What can I do to overcome this problem?

Thanks in advance
1:25 pm on Apr 20, 2010 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member whoisgregg is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Dec 9, 2003
votes: 0

Have you tried running a VACUUM FULL [postgresql.org] to defrag the disk space taken up by the file?
6:35 am on Apr 21, 2010 (gmt 0)

New User

10+ Year Member

joined:Oct 19, 2005
votes: 0

no i haven't because my db is used by a live application that is constantly inserting new data, in order to do that i need to suspend the app that is using the db. i came up with another solution, because the problem is only one table to create a script that will create an identical table with same name as my original table and then rename the original table. so the app will continue to work with the new table and I will backup the original table, then drop it and restore again, this way dead rows will not be included when table is restore. something like that :)

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members