Hosted addon · featured

Postgres with vectors, maps, and graphs

Managed PostgreSQL with pgvector and PostGIS enabled by default, native graph traversal through recursive CTEs, and hybrid retrieval that mixes vector, full-text, and geo in one SQL statement. Attached to your app — and your agents — as DATABASE_URL in one command.

$ app addons create --type postgres --plan starter --attach-default
Provisioning postgres (starter)…
Extensions: vector, postgis
Injected: DATABASE_URL, APP_ADDON_POSTGRES_URL
Ready in 9s

one database, four retrieval engines

Everything is a SQL query

HNSW vector search

pgvector ships enabled. Build HNSW indexes over embedding columns and run approximate nearest-neighbor queries in plain SQL, next to the rest of your data.

CREATE INDEX ON docs
  USING hnsw (embedding vector_cosine_ops);

SELECT id, title
FROM docs
ORDER BY embedding <=> $1
LIMIT 10;

PostGIS geospatial

PostGIS ships enabled. Geometry and geography types, spatial indexes, and distance/containment queries for anything with a location.

SELECT name
FROM places
WHERE ST_DWithin(
  geog,
  ST_MakePoint($lng, $lat)::geography,
  5000  -- within 5 km
)
ORDER BY geog <-> ST_MakePoint($lng, $lat)::geography;

Graph traversal

Model edges as rows and traverse natively with recursive CTEs — multi-hop reachability, shortest paths, and dependency walks without a separate graph database. openCypher via Apache AGE is on the roadmap.

WITH RECURSIVE reach AS (
  SELECT dst, 1 AS depth FROM edges WHERE src = $start
  UNION
  SELECT e.dst, r.depth + 1
  FROM edges e JOIN reach r ON e.src = r.dst
  WHERE r.depth < 4
)
SELECT DISTINCT dst, min(depth) FROM reach GROUP BY dst;

Hybrid retrieval

Combine vector similarity, full-text rank, and recency in one query — or fan out to a gobed addon for GPU-scale candidate generation and rerank in SQL.

SELECT id, title,
  0.6 * (1 - (embedding <=> $emb))
+ 0.4 * ts_rank(fts, plainto_tsquery($q)) AS score
FROM docs
WHERE fts @@ plainto_tsquery($q)
   OR embedding <=> $emb < 0.35
ORDER BY score DESC LIMIT 20;

operations

Managed like an addon should be

Injected environment

APP_ADDON_POSTGRES_URL

Full connection string (postgres://…) · secret

DATABASE_URL

Set to the same URL when created with --attach-default · secret

APP_ADDON_POSTGRES_HOST

Hostname

APP_ADDON_POSTGRES_PORT

Port

APP_ADDON_POSTGRES_DB

Database name

APP_ADDON_POSTGRES_USER

Role name

APP_ADDON_POSTGRES_PASSWORD

Password · secret

Starter

50 credits/mo

shared pool, daily backups

Pro

150 credits/mo

more compute + storage, PITR backups

Scale

400 credits/mo

dedicated resources, read replicas on request

Backups billed per GB in credits, credential rotation on demand, secrets scrubbed from build and CI logs, and one-click test/disable/delete from the addons dashboard or CLI. Coding agents get the same DATABASE_URL — so migrations, seeds, and query verification are agent tasks, not runbooks.

Vectors in Postgres, GPUs when you outgrow it

Start with pgvector HNSW inside your database. When a corpus needs GPU throughput, pair it with the gobed addon and keep Postgres as the source of truth.