pg_zega
pg_zega · Synchronize tracked relational tables and schema into an external Zega graph.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 102367 | pg_zega | pg_zega | 0.3 | ETL | Apache-2.0 | C |
PostgreSQL · 17
Usage
Sources:
pg_zega 0.3 synchronizes supported tables and DDL into an external Zega graph. It requires PostgreSQL 17, libcurl and superuser administration. PostgreSQL credentials and the Zega bearer token are distinct secrets. Configure zega.url and the protected zega.password setting before tracking data, reload and use a new session.
Track and import
Tracking adds a row trigger but does not copy existing rows. A node table requires one primary-key column; supported fields are integer, floating-point, boolean and text-like types. A ze_-prefixed edge table needs exactly two disjoint foreign-key constraints and a primary key comprising their columns. Unsupported types, including numeric, timestamp, uuid and json, are rejected.
Delivery and maintenance
Default precommit mode waits for Zega; rejection aborts the PostgreSQL transaction. This is not a general distributed-transaction guarantee. Journal mode commits locally and delivers asynchronously using Zega receipts; it requires preload/restart, logical WAL, a delivery worker and a replication slot created before enabling the mode. Monitor journal lag and retained WAL.
zega.import locks every tracked table against writes and can replace graph nodes/edges in its scope. Run it without other row changes in the transaction; imported engine IDs change. The DDL event trigger rejects changes incompatible with existing graph values. Precommit mode does not require preload; journal mode needs the additional configuration in the official guide.