graph_accel
graph_accel · In-memory graph traversal acceleration extension for Apache AGE.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101010 | graph_accel | graph_accel | 0.5.0 | FEAT | Apache-2.0 | Rust |
PostgreSQL · 13, 14, 15, 16, 17, 18
| Relationships | |
|---|---|
| Requires | age |
Usage
Sources:
graph_accel is a read-only, in-memory traversal accelerator for graphs stored by the Apache AGE extension. Use it when an AGE graph must serve repeated neighborhood, shortest-path, degree, or induced-subgraph queries without repeatedly executing Cypher. The cache belongs to one PostgreSQL backend; it is not shared across sessions.
Core Workflow
Install Apache AGE first, create graph_accel as a superuser, select the AGE graph, and load its adjacency data into the current backend:
graph_accel_load() reports node count, edge count, and load time. graph_accel_neighborhood() returns each reachable node with its label, application identifier, distance, and path edge metadata. graph_accel_path() finds an unweighted shortest path subject to its hop, direction, and optional confidence filters. graph_accel_subgraph() returns an induced subgraph around seed identifiers.
Configuration and Cache Invalidation
graph_accel.source_graphselects the AGE graph; it can also be passed tograph_accel_load().graph_accel.node_id_propertyselects the node property exposed as the application identifier.graph_accel.node_labelsandgraph_accel.edge_typesrestrict loaded labels and edge types;*means all.graph_accel.max_memory_mblimits the cache in each backend, not cluster-wide memory.graph_accel.auto_reloadandgraph_accel.reload_debounce_seccontrol generation-based reload behavior.
AGE writes bypass ordinary PostgreSQL triggers used by this extension. After changing graph data, the writer must explicitly advance the generation:
The function sends a notification, but other sessions reload only when they next check and observe a generation mismatch. Without cooperative invalidation they can continue serving stale cached topology.
Operational Notes
The reviewed README covers PostgreSQL 13-18, but its prebuilt artifact is tied to the exact PostgreSQL/Apache AGE ABI of the documented image; rebuild for other combinations. Memory use multiplies with the number of backends that load a graph. The accelerator does not replace AGE as the source of truth and does not provide weighted shortest paths or write operations.