3 ms·
> Postgres’s MVCC implementation with immutable tuples means every write (even updates to a column not in any indexes) to a table touches every index on that ta
by anarazel 9y ago
> Postgres’s MVCC implementation with immutable tuples means every write (even updates to a column not in any indexes) to a table touches every index on that table.
The parenthetical comment is not true. If no indexed columns are updated, and there's space on the same page, a so called "HOT" update is performed. Basically a redirection is inserted triggering index scans to follow the update chain to the newest version:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/access/heap/README.HOT&hb=HEAD https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f...
- dragonwriter 9y agoEdited the comment to correct the error in my original understanding; thanks for pointing it out!