This repository contains examples of problems that might arise if developers are not aware of the different isolation levels in databases.
We use PostgreSQL specifically here. Consult your vendor for details on their isolation levels. Relevant Postgres 17 docs on isolation levels: https://www.postgresql.org/docs/current/transaction-iso.html.
This level uses snapshots for each separate command. A query that acts based on previously read data might be using stale data if another transaction committed a mutation to values read by the previous select.