We have a Ruby code base that runs multiple jobs on our website. We deployed a piece of code and saw that it bloated up one table in our database because of several updates that happened in this table due to the code.
We need 3 things in this project:
1. Immediately remove the bloat in our database (82% bloat in the biggest table) through partial/manual/FULL vacuum as the bloat is causing certain processes to slow down on our app. We have Auto-Vacuum settings enabled and the settings - We also find that auto-vacuum is not being run on our biggest table (Candidate_Project_Matchings table), so that probably caused the bloat in this table and needs to be fixed.
2. Prevent such bloat from being created in the future and editing database features in a way that auto-vacuum is run on all tables effectively, including the biggest table
3. Re-indexing our index tables, if needed, to remove existing bloat and prevent future bloat
Our DB Size is 53GB, and the biggest table takes up 26GB (Out of which 22GB is bloat). We have total disk space of 160GB right now an EC2 instance. We are using PostGreSQL v11.
About the recuiterMember since Mar 14, 2020 Himanshu Shekha
from Leinster, Ireland