vulns.co
/
GKData.io MCP

PostgreSQL Global Development Group · 1 min read

PostgreSQL 18: Transaction Isolation and Business Invariants

Explains why a stable database snapshot alone does not preserve business rules across concurrent transactions. PostgreSQL distinguishes serializable consistency from explicit locking and requires serialization-failure retries to repeat the whole transaction, including the decisions that produced its writes.

Open the reference Implementation GuideReviewed 2026-10-03

How to use this reference

For an owned application, document the invariant, the transaction boundary and the isolation or locking assumptions that protect it. As an editorial application, connect approval-state decisions to their database consistency requirements; do not assume that repeating only the final write revalidates an earlier decision.

Before reading

  • Basic database transactions and isolation levels
  • Application business rules and state transitions

Context and limits

  • PostgreSQL-specific semantics must not be assumed for another database or version. The documented serializable-integrity approach requires consistent participation by relevant reads and writes.
  • The documented serializable protection does not extend to hot standby or logical replicas; deployment boundaries matter.
  • Unique-key and exclusion-constraint errors can be persistent rather than transient; they do not justify blanket retries. Retrying does not guarantee eventual completion.
  • This is conceptual defensive education, not a vulnerability finding, testing authorization or executable concurrency recipe.

Sources and provenance

  1. PostgreSQL 18: Data Consistency Checks at the Application Level PostgreSQL Global Development Group · reviewed 2026-10-03
  2. PostgreSQL 18: Serialization Failure Handling PostgreSQL Global Development Group · reviewed 2026-10-03

Record reviewed 2026-10-03. Snapshot 53796974ace8. Open the complete JSON contract.

GitHub snapshot 2026-10-04

53796974ace8 · JSON exports & schemas · CC BY 4.0 content / MIT software