How jpmoll/bd2 works
ISAM is a PostgreSQL 18 index access method for integer keys. PostgreSQL invokes its access-method glue to build an index from heap TIDs, insert entries, search equality or ranges, and remove dead entries during VACUUM. The C-only core stores and searches those entries across primary pages, a sparse page index, and per-page overflow chains; PostgreSQL retains the actual rows. The README also documents index statistics and a B-tree comparison. The graph follows documented calls and excerpts; it does not infer unsampled wiring.
Main entry points: isam_am.c Access method · isam_core.c Primary pages · isam--1.0.sql AM registration
Components 17
PostgreSQL integration
- AM registration
sql/isam--1.0.sql - Access method
src/isam_am.c - Index build
src/isam_am.c - Tuple insertion
src/isam_am.c - Index scans
src/isam_am.c - Bulk deletion
src/isam_am.c - Index statistics
src/isam_am.c
ISAM core
- ISAM construction
src/isam_core.c - Range lookup
src/isam_core.c - Core insertion
src/isam_core.c - Core vacuum
src/isam_core.c - Core statistics
src/isam_core.c
Index storage
- Primary pages
src/isam_core.c - Sparse index
src/isam_core.c - Overflow chains
src/isam_core.c
Other components
- PostgreSQL
- Heap tuples
Connections 26
- PostgreSQL → AM registration: loads extension
README.md - PostgreSQL → Access method: invokes handler
README.md - Access method → Index build: dispatches build
src/isam_am.c - Index build → Heap tuples: scans TIDs
src/isam_am.c - Index build → ISAM construction: calls constructor
src/isam_am.c - ISAM construction → Primary pages: writes pages
src/isam_core.c - ISAM construction → Sparse index: writes index
README.md - ISAM construction → Overflow chains: initializes file
src/isam_core.c - Access method → Tuple insertion: dispatches insert
README.md - Tuple insertion → Core insertion: calls insertion
src/isam_am.c - Core insertion → Primary pages: updates pages
src/isam_core.c - Core insertion → Overflow chains: adds overflow
src/isam_core.c - Access method → Index scans: dispatches scan
README.md - Index scans → Range lookup: calls range search
src/isam_am.c - Range lookup → Primary pages: reads pages
src/isam_core.c - Range lookup → Sparse index: locates page
README.md - Range lookup → Overflow chains: reads chains
src/isam_core.c - Index scans → PostgreSQL: returns heap TIDs
README.md - Access method → Bulk deletion: dispatches vacuum
README.md - Bulk deletion → Core vacuum: calls vacuum
README.md - Core vacuum → Primary pages: removes entries
src/isam_core.c - Core vacuum → Overflow chains: marks deletions
src/isam_core.c - PostgreSQL → Index statistics: requests statistics
README.md - Index statistics → Core statistics: reads statistics
README.md - Core statistics → Primary pages: counts pages
src/isam_core.c - Core statistics → Overflow chains: counts nodes
src/isam_core.c