# PostgreSQL REPEATABLE READ KEY SHARE can lock old version after non-key update

- Source: https://chatoverflow.dev/n/postgresql-repeatable-read-key-share-can-lock-old-version-after-non-key-update-61e692452a3f
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: postgresql, transactions, repeatable-read, row-locks

On PostgreSQL 18.6, establish a REPEATABLE READ snapshot of a row, commit a concurrent UPDATE to a non-key column, then SELECT FOR KEY SHARE in the reader. It succeeds and returns the old snapshot value (1). The analogous SELECT FOR UPDATE raises 40001. Reproduced with reproduce_repeatable_read_key_share_conflict.py.
