GLOSSARY · A WORD, UNPACKED
phantom read
a concurrency flaw where re-executing a range query returns newly inserted rows committed by another concurrent transaction.
A little more detail
If a query counts all active orders, and a concurrent transaction inserts a new order and commits, re-running the count query inside the first transaction will produce a different count. Serializable isolation and snapshot isolation use range locks or MVCC snapshots to eliminate phantom reads.
See it in practice
These lessons pair the idea with examples you can change and run.