pg_lineage
alohadb · AlohaDB temporal dataset fingerprints, model lineage and overlay branches
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 102462 | pg_lineage | alohadb | 1.0 | FEAT | MIT | SQL |
PostgreSQL · 18
| Relationships | |
|---|---|
| Requires | plpgsql |
Usage
Sources:
pg_lineage 1.0 records reproducible dataset fingerprints, links model versions to datasets, and provides writable overlay branches over system-versioned tables.
These are preview modules of AlohaDB 21.2.0, a PostgreSQL 18 fork. Compatibility with stock PostgreSQL is not established.
Snapshot and Inspect
Install the SQL/PLpgSQL extension as a superuser. The source table must already be versioned by the matching AlohaDB pg_temporal or pg_bitemporal implementation. Same-named extensions from other projects are not interchangeable. No preload is required by pg_lineage itself.
The example assumes an existing versioned customers table. A snapshot stores a timestamp, row counts and content hashes; it does not copy or lock in the historical rows. Retaining temporal history and the relevant schema is necessary for reproduction. lineage_verify detects a changed or missing historical dataset; it does not repair it.
Branches and Maintenance
lineage_branch_create creates a view, delta table and tombstones over the base at a branch point, using a real primary key. Writes to the view change the overlay. lineage_branch_diff compares it with the base; lineage_branch_merge writes changes back with conflict checks. Its force=true option bypasses conflict refusal and needs separate review.
Operations run with caller permissions and require access to the base/history tables and schema objects. A branch is not database or tenant isolation. Drop branches with lineage_branch_drop and snapshot metadata with lineage_snapshot_drop; retain referenced history and real backups independently. The former name is alohadb_lineage.