read skew
Read related facts from different committed moments and combine an inconsistent view.
Use this when A report reads an account before a transfer and the other account after it.
without the term
“This report reads one account before a transfer and another afterward, producing a total that never existed.”
with the term · How do you ask a model for read skew?
Reproduce read skew across these reads. Use a consistent snapshot and verify the combined total during a transfer.
What is read skew?
Read skew mixes related values that were individually committed but do not form one coherent snapshot. For example, separate reads can double-count or miss a transfer between accounts.
Why does read skew matter when vibe coding?
An agent can use a transaction while its isolation level still takes a fresh snapshot for each statement.
How do you do read skew?
Interleave a transfer between the report’s two reads. Use a suitable transaction snapshot or one consistent query, then verify the reported invariant.
What goes wrong with read skew?
Read skew does not require a dirty read. Stable reads still do not prevent write skew in other transactions.
Sources for this entry
- Berenson et al.: A Critique of ANSI SQL Isolation Levels
Definitions of read skew and write skew, and the distinction between snapshot isolation and serializability.
- PostgreSQL: Transaction isolation
Isolation-level behavior in PostgreSQL; snapshot isolation can still allow serialization anomalies.
Sources checked . Source checks do not establish human editorial approval. How we check content.