Postgres MVCC
Index improvements
Visibility map
- One bit per page.
- 1: The page contains only
rows visible to all transactions.
- 0: The page contains at least one
row not visible to all transactions, (due to update).
- The visibility map of a table is rewritten when the table is vacuumed.
- Bits are cleared as rows on the page are updated.
- If a page's bit is 1:
- Hasn't been updated since the last vacuum.
- It can be skipped on the next vacuum.
- Index-only scans can avoid examining rows on the page.
|