PostgreSQL 18, Read Committed, two sessions. The reporting screen counts 12 matching orders. Another session inserts a matching order and commits. The screen then fetches the first page.
Each SELECT takes its snapshot when its own statement starts. The total describes the earlier set, and the page includes the order committed in between. Wrapping both SELECTs in a transaction changes nothing here, because Read Committed still gives each statement a fresh snapshot.
The rule I want is narrow. The count and the rows describe the same report, even if newer orders exist by the time anyone looks at it. The pair also reaches the screen together.
One Repeatable Read transaction around both reads gives them a shared snapshot. One combined query makes them a single read. Which states the rule more clearly?