![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Persistent, mmap-backed storage for the full provenance circuit. More...
#include "GenericCircuit.h"#include "MMappedUUIDHashTable.h"#include "MMappedVector.hpp"#include "provsql_utils.h"

Go to the source code of this file.
Classes | |
| struct | GateInformation |
Per-gate metadata stored in the gates MMappedVector. More... | |
| class | MMappedCircuit |
| Persistent mmap-backed representation of the provenance circuit. More... | |
Functions | |
| GenericCircuit | createGenericCircuit (pg_uuid_t token) |
Build an in-memory GenericCircuit rooted at token. | |
Persistent, mmap-backed storage for the full provenance circuit.
MMappedCircuit is the authoritative store for all provenance circuit data that must survive transaction boundaries and be accessible across multiple PostgreSQL backends. It composes three MMappedVector instances plus one MMappedUUIDHashTable:
| Component | Contents |
|---|---|
mapping | UUID → gate index (hash table) |
gates | GateInformation records, one per gate |
wires | Flattened child-UUID lists for all gates |
extra | Variable-length string data (e.g. provenance labels) |
All four backing files live in the PostgreSQL data directory and are opened/created by the ProvSQL background worker at startup.
The free-function createGenericCircuit() traverses the mmap data starting from a given root UUID to construct an in-memory GenericCircuit for evaluation.
Definition in file MMappedCircuit.h.
| GenericCircuit createGenericCircuit | ( | pg_uuid_t | token | ) |
Build an in-memory GenericCircuit rooted at token.
Performs a depth-first traversal of the mmap-backed circuit starting from token and copies all reachable gates and wires into a newly constructed GenericCircuit.
| token | UUID of the root gate. |
GenericCircuit containing the sub-circuit. Definition at line 349 of file MMappedCircuit.cpp.

