Block Range Index (BRIN)
A PostgreSQL BRIN index summarizes groups of adjacent heap pages so queries can exclude page ranges that cannot satisfy their conditions.
Candidates: The executor rechecks rows in candidate ranges; a candidate need not match. BRIN is not just min-max: PostgreSQL 18 also has minmax-multi, inclusion and Bloom classes. [1]
Granularity: pages_per_range counts heap pages, not rows or Parquet pages; PostgreSQL 18 defaults to 128. Finer ranges cost more summaries but may prune better. [2]
Coverage: An unsummarized range remains a scan candidate, not an empty range. This is not protection against corrupt index metadata. [3]
Maintenance: autosummarize defaults to off. brin_summarize_new_values() covers missing summaries. brin_summarize_range() covers a range only if it is unsummarized; it does not refresh an existing summary. Desummarizing then summarizing can tighten bounds after deletions, not verify integrity. [4]
Native check: In PostgreSQL 16.15, DELETE and VACUUM left broad bounds; rebuilding avoided one heap block and 100 rejections without changing answers. Three fresh-cluster repeats covered 42 stage/query observations on a one-page fixture with forced plans; not speed or physical-I/O measurements, nor PostgreSQL 18 execution. [6]
Inspection: Follow the range-map pointer. After desummarization, the raw page scan still exposed an old tuple although its range-map entry was invalid; it was not an active summary. [6] [7]
Relations
- related
- Zone map (min-max index), Bloom filter
Citations
- PostgreSQL 18: BRIN indexes and operator classes
- PostgreSQL 18: CREATE INDEX, BRIN storage parameters
- PostgreSQL REL_18_0: BRIN scan and unsummarized-range design
- PostgreSQL 18: index maintenance functions
- Hesela: native PostgreSQL 16.15 BRIN maintenance, replay and observations
- PostgreSQL REL_16_15: range-map lookup and desummarization
Further reading
Sources & caveats
- PostgreSQL 18 documentation synthesis, plus a separate native PostgreSQL 16.15 controlled experiment recorded 2026-11-18; no PostgreSQL 18 execution or performance measurement.
- Author-verified synthetic fixtures, exact sequential-result controls and three fresh-cluster repetitions; no independent scientific replication.