append_only_heap
PostgreSQL table access method that avoids fragmentation of variable-length append-only data.
append_only_heap · PostgreSQL table access method that avoids fragmentation of variable-length append-only data.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100517 | append_only_heap | append_only_heap | 1.0 | FEAT | MIT | C |
Usage
Sources:
- append_only_heap README at the reviewed commit
- append_only_heap.control at the reviewed commit
- Version 1.0 install SQL
- Table-access-method implementation
append_only_heap is a table access method that reuses PostgreSQL heap behavior but adds HEAP_INSERT_SKIP_FSM to inserts. New tuples therefore avoid free-space-map holes, which can reduce fragmentation for variable-length workloads that truly append data.
Create a Trial Table
Caveats
- The name does not enforce immutability:
UPDATE,DELETE, andTRUNCATEremain inherited heap operations. Enforce an append-only policy separately. - The version
1.0implementation callsmprotectand overwrites function pointers in PostgreSQL’s otherwise constant process-globalTableAmRoutine. That unsupported internal hook can fail to load, conflict with other modules, or break after a server change. - Skipping free-space reuse increases relation growth when rows are updated or deleted. Treat this as experimental storage code, benchmark bloat and vacuum behavior, and test crash recovery and upgrades on disposable data.