Documentation · field guide

Basin documentation

Everything below lives in the repository under docs/ and is versioned with the engine, so it never drifts from the binary you're running. This page is the map; the links go to the source of truth.

01 · start here

Quickstart

Basin is one binary. Point it at a data directory and run — local development needs no external object store, and the same binary that runs on your laptop is the one that runs against S3.

# Docker — pgwire on :5432, no Rust toolchain docker run --rm -p 5432:5432 -v basin-data:/var/basin --name basin basin-server # From source — pgwire on :5433 BASIN_DATA_DIR=/tmp/basin cargo run -p basin-server # Connect with any Postgres client psql 'postgres://alice@127.0.0.1:5433/alice'
02 · how it works

Architecture

pgwire on the front, Vortex-compressed columnar files on an S3-compatible bucket on the back, with a file-backed WAL between them. A project is a bucket prefix the engine refuses to read across, resolved once at connection accept.

03 · the wire

SQL compatibility

Basin parses with libpg_query — the actual PostgreSQL parser, vendored — so at parse time your ORM cannot tell the difference. 863 of 975 SQL fragments pass on the default configuration (88.5%). Basin is Postgres-compatible, not Postgres; the gaps are documented rather than papered over.

AreaStatus
pgwire v3Simple + extended query, TLS, COPY, prepared statements, binary params
Row-Level SecurityENABLE ROW LEVEL SECURITY + CREATE POLICY, enforced at the plan layer
Vector searchvector(N) + HNSW, pgvector-compatible operators
ExtensionsEquivalents for pgcrypto, uuid-ossp, pg_trgm, plus basin-cron / net / geo / cv
Stored proceduresLANGUAGE sql + CALL only — no PL/pgSQL, PL/Python or PL/Perl
ReplicationNot supported — wrong shape for object-store storage; CDC out of scope
FederationNo postgres_fdw / dblink; use basin-net for HTTP-shaped reads
04 · isolation

Multi-project

The connection URL names the project. After accept, ordinary SQL — no per-query auth, no row-scoping boilerplate. Adding a tenant writes no new heap pages and books no connection slot, which is where the cost shape comes from.

05 · included

Batteries included

Auth, REST, cron, webhooks, Wasm functions, vector search and an Iceberg catalog are all in the same binary — not sidecars to deploy and version separately.

06 · clients

Client SDKs

Ten engine-direct SDKs, all MIT-licensed and all speaking pgwire + REST straight to a Basin engine. They live in the monorepo under sdks/ and are versioned alongside the engine they target.

07 · running it

Operations

Basin is meant to be self-hosted on your own box and your own bucket. Runbooks and operator guides are versioned in the repository next to the code they cover.

08 · why

Design decisions

Basin is opinionated about scope, and the reasoning is written down. Every "no" in the compatibility table has a one-page rationale that includes the trigger which would change our mind.

Open an issue before a PR that adds new surface area. The ADRs exist so scope arguments happen once, in writing, rather than in review.