{
  "slug": "group-commit",
  "term": "Group commit",
  "aliases": [],
  "definition": "Group commit is a logging optimization that shares a durable log synchronization across multiple concurrent transaction or write requests.",
  "note": "PostgreSQL can persist several commit records in one WAL synchronization without flushing all changed data pages. [pg-intro] Group commit can occur with commit_delay=0; an added delay is a batching opportunity, not a durability exemption. [pg-configuration] RocksDB also groups compatible concurrent writes; different write options can prevent grouping. [rocksdb-wal] Hesela's distinction: sharing persistence work does not turn separate transactions into one application-level atomic operation. [pg-transactions] The 1984 DeWitt et al. report distinguishes early lock release from client acknowledgment and requires dependency-aware log persistence; it does not establish invention priority. [dewitt-1984]",
  "status": "shipping",
  "advantages": [
    {
      "text": "Amortizes log synchronization overhead across concurrent commits.",
      "citationIds": [
        "pg-intro"
      ]
    }
  ],
  "limitations": [
    {
      "text": "Waiting to collect more commits can increase latency and can reduce throughput.",
      "citationIds": [
        "pg-configuration"
      ]
    },
    {
      "text": "The mechanism does not itself specify replica acknowledgments or the storage stack's persistence guarantees.",
      "citationIds": [
        "pg-settings",
        "pg-reliability"
      ]
    }
  ],
  "related": [
    "write-ahead-log",
    "asynchronous-commit"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "citations": [
    {
      "id": "pg-intro",
      "title": "PostgreSQL 18: Write-Ahead Logging",
      "url": "https://www.postgresql.org/docs/18/wal-intro.html",
      "accessed": "2026-10-15"
    },
    {
      "id": "pg-configuration",
      "title": "PostgreSQL 18: WAL Configuration, group commit",
      "url": "https://www.postgresql.org/docs/18/wal-configuration.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": "pg-reliability",
      "title": "PostgreSQL 18: Reliability",
      "url": "https://www.postgresql.org/docs/18/wal-reliability.html",
      "accessed": "2026-10-15"
    },
    {
      "id": "rocksdb-wal",
      "title": "RocksDB: WAL Performance, Group Commit (unversioned wiki)",
      "url": "https://github.com/facebook/rocksdb/wiki/WAL-Performance",
      "accessed": "2026-10-15"
    },
    {
      "id": "pg-transactions",
      "title": "PostgreSQL 18: Transactions",
      "url": "https://www.postgresql.org/docs/18/tutorial-transactions.html",
      "accessed": "2026-10-15"
    },
    {
      "id": "dewitt-1984",
      "title": "DeWitt et al. Implementation Techniques for Main Memory Database Systems. UCB/ERL M84/5 (1984), section 5.2.",
      "url": "https://www2.eecs.berkeley.edu/Pubs/TechRpts/1984/Archive/ERL-m-84-5.pdf",
      "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"
}
