Skip to content

PostgreSQL inside your application.

PostgreSQL 19 · embedded runtime

Run PostgreSQL in your application process—with transactions, WAL, crash recovery, and bundled extensions, but no database server to install or supervise.

  • Linux x86-64
  • glibc 2.17+
  • PostGamma · Apache-2.0
quickstart
import postgamma

with postgamma.connect("agent.pgm",
                       autocommit=True) as db:
    db.execute("create table notes "
               "(id bigint, body text)")
    db.execute("insert into notes values ($1, $2)",
               [1, "local memory"])
    rows = db.execute("select * from notes").fetchall()

# [(1, 'local memory')]
Embedded cluster ready no SQL socket
Your processPostgreSQL 19
19PostgreSQL core
3.10–3.14CPython wheels
2.17+glibc baseline
C ABIStatic SDK
0.8.6Bundled pgvector

Python and C

Choose the interface that fits.

Both SDKs bundle the same PostgreSQL kernel and version-matched resources. Neither requires an installed PostgreSQL server.

PY
Python SDKNative CPython wheel
3.10–3.14

Install once.
Import normally.

The wheel bundles the Python API, PostgreSQL kernel, and version-matched resources for each supported CPython ABI. The installation command below applies after publication; see downloads for current availability.

python -m pip install "postgamma==0.1.0a1"
C
Static C SDKStable public ABI
Linux x86-64

Link PostgreSQL
into native software.

Link against libpostgamma.a; its stable public ABI keeps PostgreSQL implementation types private.

pkg-config --static --libs postgamma

The PostgreSQL core, reframed

Keep the database semantics.
Lose the service boundary.

PostGamma changes PostgreSQL’s deployment model while preserving its database behavior. Your application owns startup and shutdown; PostgreSQL still owns parsing, planning, catalogs, transactions, WAL, and recovery.

01 PostgreSQL behavior, preserved

Use the SQL and semantics you already know.

Preserved behavior includes PostgreSQL syntax and types, SQLSTATE diagnostics, prepared statements, COPY, notices, notifications, and logical dump and restore.

SQLACIDJSONBCOPYWALVector
postgres=#select id, body from notes;
1local memory1 row
Compatibility contract
02 In-process

One process.
One lifecycle.

No database server to install, configure, or supervise.

OS process
HostYour app
EnginePostgreSQL
See the architecture
03 Explicit ownership

Open, connect, query, and close explicitly.

  1. 01Openinitialize or recover
  2. 02Connectcreate logical sessions
  3. 03QuerySQL, COPY, vectors
  4. 04Closeclean shutdown
Paths and creation
04 Reviewed extension surface

Vector search,
inside the same process.

pgvector 0.8.6 is bundled and validated with the embedded kernel. Only reviewed extensions are linked into each build.

0.8.6pgvectorbundled
Build vector search

Built for local software

Put PostgreSQL where a separate service does not fit.

Choose deliberately

PostGamma is not a universal replacement for a PostgreSQL server. Each cluster directory can be owned by only one live OS process at a time.

Read the selection guide
01

Agents and developer tools

Structured state, task data, and vector search beside the application.

02

Desktop and edge software

A PostgreSQL data layer that ships with the application itself.

03

Tests and reproducible jobs

Isolated PostgreSQL clusters through an API, without provisioning a server.

Start small. Keep PostgreSQL.

Give your application
a path and ordinary SQL.

The quickstart shows what PostGamma creates, where the cluster lives, and how to reopen it safely.