{
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-19",
  "slug": "postgresql-bitmap-heap-scan",
  "term": "Bitmap heap scan (PostgreSQL)",
  "aliases": [
    "PostgreSQL bitmap heap scan"
  ],
  "definition": "A PostgreSQL bitmap heap scan retrieves visible table tuples selected by a bitmap and performs any required predicate rechecks.",
  "note": "Selection: Exact bitmap entries retain tuple offsets, while lossy entries retain candidate pages. Heap access applies snapshot visibility; an index location is not itself a visible result row. [pg-tidbitmap] [pg-heap-bitmap]\n\nRechecks: Exact locations do not guarantee exact predicate matches. An exact page has a separate recheck flag; intersecting exact offsets with a lossy page can retain the offsets but require predicate verification. Increasing work_mem does not eliminate an index access method's approximate matches. [pg-tidbitmap] [pg-explain]\n\nReading EXPLAIN: Recheck Cond displays a planned condition, not a count of evaluations. Rows Removed by Index Recheck counts failed rechecks, not every rechecked tuple; Rows Removed by Filter describes a separate filter. Zero recheck removals does not prove no recheck ran. [pg-bitmap-executor] [pg-explain-counters]\n\nUnits: Removal counts are rounded per-loop averages; exact/lossy Heap Blocks counters are not divided by loops. Neither measures unique physical-device reads. These fields describe candidate processing, not full TOAST-value verification. [pg-explain-counters] [pg-toast]",
  "related": [
    "postgresql-bitmap-index-scan",
    "postgresql-index-only-scan",
    "existence-bitmap"
  ],
  "citations": [
    {
      "id": "pg-explain",
      "title": "PostgreSQL 18: Using EXPLAIN",
      "url": "https://www.postgresql.org/docs/18/using-explain.html",
      "accessed": "2026-11-18"
    },
    {
      "id": "pg-tidbitmap",
      "title": "PostgreSQL REL_18_0: TID bitmap precision, recheck flags and intersections",
      "url": "https://github.com/postgres/postgres/blob/REL_18_0/src/backend/nodes/tidbitmap.c",
      "accessed": "2026-11-18"
    },
    {
      "id": "pg-bitmap-executor",
      "title": "PostgreSQL REL_18_0: bitmap heap scan predicate rechecks",
      "url": "https://github.com/postgres/postgres/blob/REL_18_0/src/backend/executor/nodeBitmapHeapscan.c",
      "accessed": "2026-11-18"
    },
    {
      "id": "pg-explain-counters",
      "title": "PostgreSQL REL_18_0: EXPLAIN instrumentation and loop denominators",
      "url": "https://github.com/postgres/postgres/blob/REL_18_0/src/backend/commands/explain.c",
      "accessed": "2026-11-18"
    },
    {
      "id": "pg-heap-bitmap",
      "title": "PostgreSQL REL_18_0: heap bitmap visibility and tuple retrieval",
      "url": "https://github.com/postgres/postgres/blob/REL_18_0/src/backend/access/heap/heapam_handler.c",
      "accessed": "2026-11-18"
    },
    {
      "id": "pg-toast",
      "title": "PostgreSQL 18: TOAST and deferred external-value retrieval",
      "url": "https://www.postgresql.org/docs/18/storage-toast.html",
      "accessed": "2026-11-18"
    }
  ],
  "provenance": [
    "Counter details refer to PostgreSQL REL_18_0. Documentary comparison with the separate PostgreSQL 16.15 TOAST experiment does not extend its measured coverage."
  ]
}
