{
  "slug": "asynchronous-commit",
  "term": "Asynchronous commit",
  "aliases": [
    "Async commit"
  ],
  "definition": "Asynchronous commit is an acknowledgment mode that can report a transaction as successful before its recovery log has reached durable storage.",
  "note": "In PostgreSQL 18, synchronous_commit=off can lose recently acknowledged transactions after a crash while retaining consistent recovery, assuming the remaining safety mechanisms and storage behave correctly. This is not fsync=off. [pg-async] The setting in effect at commit controls ordinary transaction acknowledgment; PostgreSQL forces utility commands such as DROP TABLE and two-phase-commit commands such as PREPARE TRANSACTION to commit synchronously. [pg-async] Local persistence and standby progress are separate: asynchronous replication does not by itself imply asynchronous local commit. [pg-settings] Group commit with commit_delay remains a synchronous optimization; commit_delay is ignored for asynchronous commits. [pg-async]",
  "status": "shipping",
  "advantages": [
    {
      "text": "Can reduce response latency by removing the immediate WAL synchronization wait.",
      "citationIds": [
        "pg-async"
      ]
    }
  ],
  "limitations": [
    {
      "text": "A successful response is not proof that the transaction will survive a crash.",
      "citationIds": [
        "pg-async"
      ]
    },
    {
      "text": "An external action triggered by success cannot be undone by database recovery.",
      "citationIds": [
        "pg-async"
      ]
    }
  ],
  "related": [
    "write-ahead-log",
    "group-commit"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "citations": [
    {
      "id": "pg-async",
      "title": "PostgreSQL 18: Asynchronous Commit",
      "url": "https://www.postgresql.org/docs/18/wal-async-commit.html",
      "accessed": "2026-10-15"
    },
    {
      "id": "pg-settings",
      "title": "PostgreSQL 18: WAL settings, commit_delay and synchronous_commit",
      "url": "https://www.postgresql.org/docs/18/runtime-config-wal.html",
      "accessed": "2026-10-15"
    },
    {
      "id": "hesela-wal",
      "title": "Hesela: Group commit shares persistence work, not transaction identity",
      "url": "https://hesela.com/analyses/wal-checkpoints-torn-pages/#group-commit",
      "accessed": "2026-10-15"
    }
  ],
  "updated": "2026-10-15"
}
