doze doze/registry
P

PostgreSQL

official ● signed
doze/postgres
runs PostgreSQL 14 – 18 · macOS & Linux

A real PostgreSQL server per instance — no Docker. Declare roles, schemas, extensions and grants in HCL and doze converges them: creating what's new, updating what changed, dropping what you removed. Boots on first connect, reaps when idle.

Usage

Drop it in doze.hcl and run doze up.

doze.hcl
postgres "app" {
  version          = 18
  port             = 5432
  owner            = "app"
  encoding         = "UTF8"
  locale           = "en_US.UTF-8"
  connection_limit = 50
  comment          = "primary app database"
  shared_buffers   = "256MB"
  max_connections  = 100

  settings = {
    log_min_duration_statement = "200ms"
  }

  role "app" {
    password         = "app"
    login            = true
    createdb         = true
    connection_limit = 20
    member_of        = ["readers"]
  }

  role "readers" {
    login = false
  }

  schema "analytics" {
    owner = "app"
  }

  extension "pg_trgm" {}

  grant {
    role       = "app"
    privileges = ["ALL"]
    schema     = "analytics"
    objects    = "tables"
  }
}

Versions you can run

The version = you write is the engine's own version — the only version that's yours. Declare a series and doze pins its newest published build, or declare an exact build; either way it's fetched, verified, and pinned in doze.lock, so it never moves on its own.

version = pins (today) exact builds
14 14.23.0 24
15 15.18.0 19
16 16.14.0 15
17 17.10.0 11
18 18.4.0 5
every exact build, per series
14 — 14.23.0 · 14.22.0 · 14.21.0 · 14.20.0 · 14.19.0 · 14.18.0 · 14.17.0 · 14.16.0 · 14.15.0 · 14.14.0 · 14.13.0 · 14.12.0 · 14.11.0 · 14.10.0 · 14.9.0 · 14.8.0 · 14.7.0 · 14.6.0 · 14.5.0 · 14.4.0 · 14.3.0 · 14.2.0 · 14.1.0 · 14.0.0
15 — 15.18.0 · 15.17.0 · 15.16.0 · 15.15.0 · 15.14.0 · 15.13.0 · 15.12.0 · 15.11.0 · 15.10.0 · 15.9.0 · 15.8.0 · 15.7.0 · 15.6.0 · 15.5.0 · 15.4.0 · 15.3.0 · 15.2.0 · 15.1.0 · 15.0.0
16 — 16.14.0 · 16.13.0 · 16.12.0 · 16.11.0 · 16.10.0 · 16.9.0 · 16.8.0 · 16.7.0 · 16.6.0 · 16.5.0 · 16.4.0 · 16.3.0 · 16.2.0 · 16.1.0 · 16.0.0
17 — 17.10.0 · 17.9.0 · 17.8.0 · 17.7.0 · 17.6.0 · 17.5.0 · 17.4.0 · 17.3.0 · 17.2.0 · 17.1.0 · 17.0.0
18 — 18.4.0 · 18.3.0 · 18.2.0 · 18.1.0 · 18.0.0

Configuration

Arguments and nested blocks the engine accepts — generated from the module itself, so it can't drift.

Name Type Default Description
version REQ number Engine major to run — 14, 15, 16, 17 or 18.
owner string Owner role for the instance's default database.
encoding string UTF8 Character-set encoding for the database.
locale string Locale (LC_COLLATE + LC_CTYPE) for the database.
lc_collate string Collation order, overriding locale.
lc_ctype string Character classification, overriding locale.
template string Template database to create from.
connection_limit number -1 Max concurrent connections to the database.
is_template bool false Mark the database as a template.
allow_connections bool true Whether the database accepts connections.
tablespace string Tablespace the database lives in.
comment string COMMENT applied to the database.
shared_buffers string 16MB shared_buffers server setting, e.g. "256MB".
max_connections number 50 max_connections server setting.
fsync bool false fsync server setting (off for the dev tuning profile).
autovacuum bool true autovacuum server setting.
extensions list(string) Shorthand list of extensions to CREATE (or use extension blocks).
settings map(string) Arbitrary postgresql.conf settings, applied verbatim.
role"<name>" { } nested block · repeatable

A login role / user, converged on the server.

Name Type Default Description
password string Login password.
login bool true Whether the role may log in.
superuser bool false Grant SUPERUSER.
createdb bool false Allow creating databases.
createrole bool false Allow creating other roles.
replication bool false Allow streaming replication.
inherit bool true Inherit privileges of member-of roles.
bypassrls bool false Bypass row-level security.
connection_limit number -1 Per-role connection cap.
valid_until string Password expiry timestamp.
member_of list(string) Roles this role is granted membership in.
comment string COMMENT applied to the role.
config map(string) Per-role ALTER ROLE … SET settings.
schema"<name>" { } nested block · repeatable

A schema within the database.

Name Type Default Description
owner string Role that owns the schema.
extension"<name>" { } nested block · repeatable

A Postgres extension to install (pgvector, postgis, …).

Name Type Default Description
version string Specific extension version.
schema string Schema to install the extension into.
source string Path to a local extension bundle to install from.
optional bool false Skip (don't fail) if the extension is unavailable.
cascade bool false CREATE EXTENSION … CASCADE for dependencies.
grant"<role>" { } nested block · repeatable

A privilege grant to a role.

Name Type Default Description
privileges REQ list(string) Privileges to grant (SELECT, INSERT, ALL, …).
database string Target database.
schema string Target schema.
objects string Object class the grant applies to (tables, sequences, …).
with_grant_option bool false Allow the grantee to re-grant.
Under the hood — module releases you never write these; doze picks and pins automatically

The plugin releases that provide this engine. doze selects the newest one compatible with your doze and your declared versions, pins it in doze.lock, and the index is cumulative — older releases stay resolvable for pinned lockfiles. modules { postgres { version = "…" } } pins one exactly (the escape hatch for bisecting a regression).

release protocol engine support platforms
0.2.3 stable 1 14 · 15 · 16 · 17 · 18 3 platforms
0.2.2 1 14 · 15 · 16 · 17 · 18 3 platforms
0.2.1 1 14 · 15 · 16 · 17 · 18 3 platforms

raw signed data: index.yaml ↗ · meta.yaml ↗