# Table bloat

> PostgreSQL keeps the old version of every updated row until VACUUM cleans it. Heavy updates outran the cleaning, and the table filled with dead rows: every read and write costs more CPU.

## What happens

PostgreSQL keeps the old version of every updated row until VACUUM cleans it. Heavy updates outran the cleaning, and the table filled with dead rows: every read and write costs more CPU.

## How to prevent it

A retention window keeps the tables small, and a MySQL engine has no dead rows to clean.

The postmortem opens the first of these that you do not own yet:

- [Retention policies](https://wiki.playquorum.dev/research/retention.md)

## Components it hits

[Database](https://wiki.playquorum.dev/components/database.md)

## Facts

SEV2 Table bloat
- **First Era:** [Series A](https://wiki.playquorum.dev/eras/series-a.md)
- **Starts at:** SEV2
- **Escalates to:** SEV1
- **Lasts:** 2 min

## See also

- [Incidents](https://wiki.playquorum.dev/incidents.md)

Source: https://wiki.playquorum.dev/incidents/table-bloat
