pg_warren
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_warren | 0.8.0 | FEAT | Apache-2.0 | Rust |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 2645 | pg_warren | No | Yes | No | Yes | Yes | No | warren |
Shared cache preload on PG15–16
Version
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 0.8.0 el8.x86_64.pg18 : pg_warren_18 pg_warren_18-0.8.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 0.8.0 el8.x86_64.pg17 : pg_warren_17 pg_warren_17-0.8.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 0.8.0 el8.x86_64.pg16 : pg_warren_16 pg_warren_16-0.8.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 0.8.0 el8.x86_64.pg15 : pg_warren_15 pg_warren_15-0.8.0-1PGSTY.el8.x86_64.rpm
| N/A |
| el8.aarch64 | PIGSTY 0.8.0 el8.aarch64.pg18 : pg_warren_18 pg_warren_18-0.8.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 0.8.0 el8.aarch64.pg17 : pg_warren_17 pg_warren_17-0.8.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 0.8.0 el8.aarch64.pg16 : pg_warren_16 pg_warren_16-0.8.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 0.8.0 el8.aarch64.pg15 : pg_warren_15 pg_warren_15-0.8.0-1PGSTY.el8.aarch64.rpm
| N/A |
| el9.x86_64 | PIGSTY 0.8.0 el9.x86_64.pg18 : pg_warren_18 pg_warren_18-0.8.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 0.8.0 el9.x86_64.pg17 : pg_warren_17 pg_warren_17-0.8.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 0.8.0 el9.x86_64.pg16 : pg_warren_16 pg_warren_16-0.8.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 0.8.0 el9.x86_64.pg15 : pg_warren_15 pg_warren_15-0.8.0-1PGSTY.el9.x86_64.rpm
| N/A |
| el9.aarch64 | PIGSTY 0.8.0 el9.aarch64.pg18 : pg_warren_18 pg_warren_18-0.8.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 0.8.0 el9.aarch64.pg17 : pg_warren_17 pg_warren_17-0.8.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 0.8.0 el9.aarch64.pg16 : pg_warren_16 pg_warren_16-0.8.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 0.8.0 el9.aarch64.pg15 : pg_warren_15 pg_warren_15-0.8.0-1PGSTY.el9.aarch64.rpm
| N/A |
| el10.x86_64 | PIGSTY 0.8.0 el10.x86_64.pg18 : pg_warren_18 pg_warren_18-0.8.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 0.8.0 el10.x86_64.pg17 : pg_warren_17 pg_warren_17-0.8.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 0.8.0 el10.x86_64.pg16 : pg_warren_16 pg_warren_16-0.8.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 0.8.0 el10.x86_64.pg15 : pg_warren_15 pg_warren_15-0.8.0-1PGSTY.el10.x86_64.rpm
| N/A |
| el10.aarch64 | PIGSTY 0.8.0 el10.aarch64.pg18 : pg_warren_18 pg_warren_18-0.8.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 0.8.0 el10.aarch64.pg17 : pg_warren_17 pg_warren_17-0.8.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 0.8.0 el10.aarch64.pg16 : pg_warren_16 pg_warren_16-0.8.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 0.8.0 el10.aarch64.pg15 : pg_warren_15 pg_warren_15-0.8.0-1PGSTY.el10.aarch64.rpm
| N/A |
| d12.x86_64 | PIGSTY 0.8.0 d12.x86_64.pg18 : postgresql-18-pg-warren postgresql-18-pg-warren_0.8.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 0.8.0 d12.x86_64.pg17 : postgresql-17-pg-warren postgresql-17-pg-warren_0.8.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 0.8.0 d12.x86_64.pg16 : postgresql-16-pg-warren postgresql-16-pg-warren_0.8.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 0.8.0 d12.x86_64.pg15 : postgresql-15-pg-warren postgresql-15-pg-warren_0.8.0-1PGSTY~bookworm_amd64.deb
| N/A |
| d12.aarch64 | PIGSTY 0.8.0 d12.aarch64.pg18 : postgresql-18-pg-warren postgresql-18-pg-warren_0.8.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 0.8.0 d12.aarch64.pg17 : postgresql-17-pg-warren postgresql-17-pg-warren_0.8.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 0.8.0 d12.aarch64.pg16 : postgresql-16-pg-warren postgresql-16-pg-warren_0.8.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 0.8.0 d12.aarch64.pg15 : postgresql-15-pg-warren postgresql-15-pg-warren_0.8.0-1PGSTY~bookworm_arm64.deb
| N/A |
| d13.x86_64 | PIGSTY 0.8.0 d13.x86_64.pg18 : postgresql-18-pg-warren postgresql-18-pg-warren_0.8.0-1PGSTY~trixie_amd64.deb
| PIGSTY 0.8.0 d13.x86_64.pg17 : postgresql-17-pg-warren postgresql-17-pg-warren_0.8.0-1PGSTY~trixie_amd64.deb
| PIGSTY 0.8.0 d13.x86_64.pg16 : postgresql-16-pg-warren postgresql-16-pg-warren_0.8.0-1PGSTY~trixie_amd64.deb
| PIGSTY 0.8.0 d13.x86_64.pg15 : postgresql-15-pg-warren postgresql-15-pg-warren_0.8.0-1PGSTY~trixie_amd64.deb
| N/A |
| d13.aarch64 | PIGSTY 0.8.0 d13.aarch64.pg18 : postgresql-18-pg-warren postgresql-18-pg-warren_0.8.0-1PGSTY~trixie_arm64.deb
| PIGSTY 0.8.0 d13.aarch64.pg17 : postgresql-17-pg-warren postgresql-17-pg-warren_0.8.0-1PGSTY~trixie_arm64.deb
| PIGSTY 0.8.0 d13.aarch64.pg16 : postgresql-16-pg-warren postgresql-16-pg-warren_0.8.0-1PGSTY~trixie_arm64.deb
| PIGSTY 0.8.0 d13.aarch64.pg15 : postgresql-15-pg-warren postgresql-15-pg-warren_0.8.0-1PGSTY~trixie_arm64.deb
| N/A |
| u22.x86_64 | PIGSTY 0.8.0 u22.x86_64.pg18 : postgresql-18-pg-warren postgresql-18-pg-warren_0.8.0-1PGSTY~jammy_amd64.deb
| PIGSTY 0.8.0 u22.x86_64.pg17 : postgresql-17-pg-warren postgresql-17-pg-warren_0.8.0-1PGSTY~jammy_amd64.deb
| PIGSTY 0.8.0 u22.x86_64.pg16 : postgresql-16-pg-warren postgresql-16-pg-warren_0.8.0-1PGSTY~jammy_amd64.deb
| PIGSTY 0.8.0 u22.x86_64.pg15 : postgresql-15-pg-warren postgresql-15-pg-warren_0.8.0-1PGSTY~jammy_amd64.deb
| N/A |
| u22.aarch64 | PIGSTY 0.8.0 u22.aarch64.pg18 : postgresql-18-pg-warren postgresql-18-pg-warren_0.8.0-1PGSTY~jammy_arm64.deb
| PIGSTY 0.8.0 u22.aarch64.pg17 : postgresql-17-pg-warren postgresql-17-pg-warren_0.8.0-1PGSTY~jammy_arm64.deb
| PIGSTY 0.8.0 u22.aarch64.pg16 : postgresql-16-pg-warren postgresql-16-pg-warren_0.8.0-1PGSTY~jammy_arm64.deb
| PIGSTY 0.8.0 u22.aarch64.pg15 : postgresql-15-pg-warren postgresql-15-pg-warren_0.8.0-1PGSTY~jammy_arm64.deb
| N/A |
| u24.x86_64 | PIGSTY 0.8.0 u24.x86_64.pg18 : postgresql-18-pg-warren postgresql-18-pg-warren_0.8.0-1PGSTY~noble_amd64.deb
| PIGSTY 0.8.0 u24.x86_64.pg17 : postgresql-17-pg-warren postgresql-17-pg-warren_0.8.0-1PGSTY~noble_amd64.deb
| PIGSTY 0.8.0 u24.x86_64.pg16 : postgresql-16-pg-warren postgresql-16-pg-warren_0.8.0-1PGSTY~noble_amd64.deb
| PIGSTY 0.8.0 u24.x86_64.pg15 : postgresql-15-pg-warren postgresql-15-pg-warren_0.8.0-1PGSTY~noble_amd64.deb
| N/A |
| u24.aarch64 | PIGSTY 0.8.0 u24.aarch64.pg18 : postgresql-18-pg-warren postgresql-18-pg-warren_0.8.0-1PGSTY~noble_arm64.deb
| PIGSTY 0.8.0 u24.aarch64.pg17 : postgresql-17-pg-warren postgresql-17-pg-warren_0.8.0-1PGSTY~noble_arm64.deb
| PIGSTY 0.8.0 u24.aarch64.pg16 : postgresql-16-pg-warren postgresql-16-pg-warren_0.8.0-1PGSTY~noble_arm64.deb
| PIGSTY 0.8.0 u24.aarch64.pg15 : postgresql-15-pg-warren postgresql-15-pg-warren_0.8.0-1PGSTY~noble_arm64.deb
| N/A |
| u26.x86_64 | PIGSTY 0.8.0 u26.x86_64.pg18 : postgresql-18-pg-warren postgresql-18-pg-warren_0.8.0-1PGSTY~resolute_amd64.deb
| PIGSTY 0.8.0 u26.x86_64.pg17 : postgresql-17-pg-warren postgresql-17-pg-warren_0.8.0-1PGSTY~resolute_amd64.deb
| PIGSTY 0.8.0 u26.x86_64.pg16 : postgresql-16-pg-warren postgresql-16-pg-warren_0.8.0-1PGSTY~resolute_amd64.deb
| PIGSTY 0.8.0 u26.x86_64.pg15 : postgresql-15-pg-warren postgresql-15-pg-warren_0.8.0-1PGSTY~resolute_amd64.deb
| N/A |
| u26.aarch64 | PIGSTY 0.8.0 u26.aarch64.pg18 : postgresql-18-pg-warren postgresql-18-pg-warren_0.8.0-1PGSTY~resolute_arm64.deb
| PIGSTY 0.8.0 u26.aarch64.pg17 : postgresql-17-pg-warren postgresql-17-pg-warren_0.8.0-1PGSTY~resolute_arm64.deb
| PIGSTY 0.8.0 u26.aarch64.pg16 : postgresql-16-pg-warren postgresql-16-pg-warren_0.8.0-1PGSTY~resolute_arm64.deb
| PIGSTY 0.8.0 u26.aarch64.pg15 : postgresql-15-pg-warren postgresql-15-pg-warren_0.8.0-1PGSTY~resolute_arm64.deb
| N/A |
Build
You can build the RPM / DEB packages for pg_warren using pig build:
Install
You can install pg_warren directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
Usage
Sources:
pg_warren 0.8.0 builds versioned adjacency snapshots from ordinary PostgreSQL tables for graph traversal and computation. It supports PostgreSQL 15–18 and keeps graph versions, vectors and their changes within PostgreSQL transactions. Traversal reads a built snapshot; source-table changes require an explicit refresh.
Core Workflow
This is a trusted extension: a role with CREATE privilege on the database can install it. A basic graph needs node and edge queries:
The graph stores its source queries. Run warren.refresh after changing the source tables; use warren.info to inspect versions and warren.diff to compare them. Building and promoting versions rolls back with the surrounding transaction.
Traversal and Computation
| Interface | Purpose |
|---|---|
warren.bfs, warren.shortest_path | Breadth-first traversal and shortest paths |
warren.pagerank, warren.components | Rank nodes and find connected components |
warren.leiden | Detect communities |
warren.spmv, warren.gather | Compose graph calculations with SQL |
warren.vector_topk | Read the largest values from a stored vector |
warren.shared_cache, warren.backends | Inspect shared entries and backend cache usage |
Identifier types must agree with the graph. Functions without a node identifier argument may require a type witness such as NULL::bigint. In 0.8.0, PageRank and Leiden use native kernels; they write their results to named vectors.
Memory and Preload
PostgreSQL 17–18 initialize the shared cache on first use. PostgreSQL 15–16 need the following setting and a server restart to share graph data between backends:
Without preload on PostgreSQL 15–16, graph operations still work using private backend caches. Add the library to any existing preload list.
warren.shared_cache_memory limits the cluster-wide shared cache and takes effect on configuration reload. warren.max_cache_memory, warren.max_compute_memory and warren.max_build_memory limit distinct private-cache, computation and build allocations; they are not one combined memory budget. warren.threads controls computation parallelism. On Linux, shared entries also need sufficient /dev/shm; entries that do not fit fall back to private caches.
Access, Backups and Upgrades
Source queries run as the graph owner with the stored search_path. Use schema-qualified source objects and controlled schemas. Public functions enforce graph access; installation does not grant direct access to private catalog tables.
Dump as a superuser to include graph catalogs, versions and vectors, and restore the required owner/reader roles first. Rebuilding from source tables does not preserve historical graph versions. After installing newer library files, run ALTER EXTENSION pg_warren UPDATE in each database using the extension. Dropping it removes stored graphs. The project remains pre-1.0 and does not maintain graph snapshots incrementally.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)