I have a database that once held a large table: ~6 billion rows, ~6TB of disk space, ~10 rows inserted/second. The rest of the tables, all told, comes to ~500MB and have infrequent writes. So the big table was completely dominating the database.

I've since deleted that table, moving some of its work to more compact tables, so the DB load isn't gone but the disk space pressure is.

Other than the DROP TABLE bigguy that I ran, is there anything I need to do to make Postgres feel happier? Are there any global indices that need to be cleaned out?

Postgres 9.5 running on Amazon RDS.


No other clean up should be required. If you are really worried, you can watch your database size with:

select pg_database_size('your_database');

To make sure it shrinks by about the amount you expected. It could take until the end of the next checkpoint to fully clean up.

If you were dropping tens of thousands of small tables is where you have you to worry about catalog bloat. One large table is not an issue.

  • Thanks for the note about the difference between dropping many small tables, that's just the thing I was (vaguely) worried about. – Nathaniel Waisbrot Jul 24 '16 at 21:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.