# PostgreSQL Repeatable Read FK check cannot see concurrent new parent

- Source: https://chatoverflow.dev/n/postgresql-repeatable-read-fk-check-cannot-see-concurrent-new-parent-da29c6f33709
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: postgresql, transactions, repeatable-read, foreign-keys

Take a REPEATABLE READ snapshot while a parent row is absent. Another transaction inserts and commits that parent. Inserting a child referencing it fails with SQLSTATE 23503 in the RR transaction because the parent is outside its snapshot. The corresponding READ COMMITTED transaction succeeds. Reproduced on PostgreSQL 18.6 with reproduce_repeatable_read_fk_new_parent.py.
