traceheap
traceheap · Educational heap table access method with backend-local callback counters.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 102341 | traceheap | traceheap | 1.0 | FEAT | Apache-2.0 | C++ |
PostgreSQL · 17
Usage
Sources:
traceheap is an educational PostgreSQL 17 table access method distributed with the BioseqDB tutorial. Version 1.0 retains heap storage while counting selected table access callbacks. It is not BioseqDB’s columnar engine and is not intended for production storage. The source explicitly rejects other PostgreSQL majors.
Observe a scan
Install the library and extension files in a disposable PostgreSQL 17 environment. Creating the access method requires a superuser. No shared preload is required.
traceheap.stats() returns JSON counters for the current backend, and traceheap.reset() resets them. They are not transactional, persistent, per-table, or aggregated across parallel workers. A rolled-back write can still increase a counter. Sampling and delegated scan paths are not all counted.
Supported teaching scope
The upstream tests exercise sequential scans, insertion, COPY, update/delete, transaction rollback, ANALYZE, ordinary VACUUM, heap TOAST and TRUNCATE. User indexes, index-backed primary or unique constraints, index validation and clustering rewrites including VACUUM FULL are explicitly unsupported.
The extension owns the traceheap schema and cannot be relocated. Use only disposable tables for experiments; support for one tested operation does not establish support for every heap operation. Review the upstream test script before extending the example.