---
title: Database
description: Serverless Postgres with pgvector, backups and point-in-time restore — one database per customer, not rows in a shared table.
type: tutorial
product: database
summary: What a Sylphx database is, what you configure, and how it connects to your app.
updated: 2026-10-01
order: 0
---

<Callout tone="note" title="Today this runs on the management API">
Databases are provisioned with `POST /v1/resources` and bound to an environment, as in the [Database quickstart](/docs/database/quickstart). The `databases` collection serves reads at api.sylphx.com; its `create`, `delete`, `restore` and `connect` are not served.
</Callout>

A Database is one customer Postgres. It is not a schema on a shared server: a
database has its own engine, its own credentials, its own backup, its own
region, and its own deletion. Nothing you do to yours can be seen from anyone
else's.

## What you choose, and what you do not

You choose the Postgres major version, the compute size, the region, and
whether deletion is protected. You do not choose an instance class, a disk
size, a replica count or `max_connections`: those derive from the compute size,
so a database cannot be configured into a state it cannot serve.

<PropertyTable
	properties={[
		{
			name: 'postgres_version',
			type: 'string',
			description: 'The Postgres major version, for example 17. The newest supported version is the default.',
		},
		{
			name: 'compute_units',
			type: 'double',
			description: 'The compute size, in units. The default comes from the plan, and max_connections derives from it.',
		},
		{
			name: 'region',
			type: 'string',
			description: 'Where the data lives; the project’s home region by default. Changing it moves the data by signed export and import.',
		},
		{
			name: 'deletion_protection',
			type: 'bool',
			description: 'While set, Delete fails, and the database is kept.',
		},
	]}
/>

An idle free-tier database stops, and the next connection wakes it. That is a
state you do not manage: nothing to start, nothing to shut down.

## Every database is addressable

A database's name is a path, and the same path works in the API, the CLI and
the console:

<KeyValue
	items={[
		{ key: 'Name', value: 'orgs/{org}/projects/{project}/envs/{env}/databases/{database}', mono: true },
		{ key: 'Id', value: 'db_<location><ulid>', mono: true },
	]}
/>

Read a database, list the ones in an environment, create, update, delete,
open a connection, rotate its credentials and restore it in place — the
[`databases` collection](/docs/api/databases) has every call, with its scope
and its examples. `data:read` covers the reads; everything that changes the
database needs `data:write`.

## Postgres, with the extensions you would install yourself

pgvector is part of the engine, so a vector column is a normal column:

```sql
CREATE EXTENSION IF NOT EXISTS vector;

CREATE TABLE documents (
  id        uuid PRIMARY KEY DEFAULT gen_random_uuid(),
  content   text NOT NULL,
  embedding vector(1536)
);

CREATE INDEX ON documents USING hnsw (embedding vector_cosine_ops);
```

## Backups and point-in-time restore

A database is backed up on its own schedule, and `restore` puts it back to a
point in time inside its retention window. The restore happens in place: the
database is unavailable while it restores, and everything written after the
restore point is gone.

<Callout tone="warning" title="A restore is destructive">
`restore` is the one call that removes data on purpose, so the CLI asks before
it runs and the API takes `validate_only`. [Backups and restore](/docs/database/backups)
has the procedure.
</Callout>

## Connections are issued, not constructed

There is no connection string in the console to copy into a repository: you
ask for one with `connect`, and it is returned to that caller only. The
response carries the pooled `uri` and — for Postgres — the `direct_uri` that
migrations, `pg_dump`, `LISTEN`/`NOTIFY`, session `SET` and logical
replication need.

<RelatedDocs
	links={[
		{
			href: '/docs/database/quickstart',
			label: 'Quickstart',
			description: 'Create a database, connect to it, and run the first query.',
		},
		{
			href: '/docs/api/databases',
			label: 'The databases collection',
			description: 'Every method, its scope and its examples.',
		},
		{
			href: '/docs/cli',
			label: 'The CLI',
			description: 'The same calls as `sylphx data databases …`.',
		},
	]}
/>
