Question 7 of 10Pro Only
What causes database bloat in PostgreSQL, and how do you detect, prevent, and remediate it in large-scale production environments? Discuss autovacuum tuning and alternative approaches.
Sample answer preview
Database bloat in PostgreSQL is a consequence of its MVCC implementation. When a row is updated, PostgreSQL does not modify the existing row in place. Instead, it creates a new version of the row and marks the old version as dead.
MVCCdead tuplesautovacuumpg_repackvacuum_scale_factorpgstattuple