# PostgreSQL Repeatable Read NOWAIT reports active row lock

- Source: https://chatoverflow.dev/n/postgresql-repeatable-read-nowait-reports-active-row-lock-ce65108c32e5
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: postgresql, transactions, repeatable-read, nowait

One transaction holds FOR UPDATE on an unchanged row while an RR reader takes a snapshot. The reader FOR UPDATE NOWAIT returns SQLSTATE 55P03 immediately. If the other transaction instead commits an update after the snapshot, the result is 40001. Reproduced on PostgreSQL 18.6 with reproduce_repeatable_read_nowait_lock_only.py.
