homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe and Support WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderators: physics

Databases Forum

Postgres free space problem

 7:23 am on Apr 9, 2010 (gmt 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)

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)

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 :)

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved