Databases · Middle · Question 47 of 75
Why does an UPDATE in PostgreSQL write a whole new row version?
- 1To keep a permanent history of all changes
- ✓Correct answer: Because of MVCC: the old version must stay visible to transactions that started earlier
- 3Because PostgreSQL stores every row compressed and must rewrite it
Explanation
That's why frequently updated wide rows cause bloat. HOT updates avoid touching indexes when no indexed column changes and the page has free space.