Summary
A narrow window exists where two concurrent transactions inserting the same key can both miss the unique conflict.
Detail
Uniqueness is enforced through the supporting index over rows as they are inserted. While one transaction's inserting statement is still in flight, its rows are not yet flushed and are not visible to another backend, so a second transaction inserting the same key during that window may not see the conflict. The window closes when the inserting statement flushes at statement end, after which the conflict is detected.
Single-session inserts and inserts separated in time are not affected.
Source
Relates to the eager row-number reservation and the index fetch path introduced in the index and constraint work (src/columnar_write_state.c, src/columnar_tableam.c).
Status
Documented in the README limitations section. Tracked here for a future dedicated pass. A complete fix likely requires speculative insertion style coordination across backends before the rows are flushed.
Summary
A narrow window exists where two concurrent transactions inserting the same key can both miss the unique conflict.
Detail
Uniqueness is enforced through the supporting index over rows as they are inserted. While one transaction's inserting statement is still in flight, its rows are not yet flushed and are not visible to another backend, so a second transaction inserting the same key during that window may not see the conflict. The window closes when the inserting statement flushes at statement end, after which the conflict is detected.
Single-session inserts and inserts separated in time are not affected.
Source
Relates to the eager row-number reservation and the index fetch path introduced in the index and constraint work (
src/columnar_write_state.c,src/columnar_tableam.c).Status
Documented in the README limitations section. Tracked here for a future dedicated pass. A complete fix likely requires speculative insertion style coordination across backends before the rows are flushed.