Hosted addon · featured

Postgres with vectors, maps, and graphs

Managed PostgreSQL with pgvector and PostGIS enabled by default, graph traversal through recursive CTEs, and hybrid retrieval mixing vector, full-text, and geo in one SQL statement. Attaches to your app and 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 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.

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 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

Backups, rotation, and teardown

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, one-click test, disable, or delete from the dashboard or CLI, and the same DATABASE_URL for coding agents — so migrations, seeds, and query verification are agent tasks.

Start with HNSW in Postgres, add GPUs later

Start with pgvector HNSW in your database. When a corpus needs GPU throughput, pair it with the gobed addon; Postgres stays the source of truth.