---
title: PostgreSQL
url: "/docs/databases/postgres/"
canonical_url: https://docs.blossom88.com/docs/databases/postgres/
markdown_url: https://docs.blossom88.com/docs/databases/postgres.md
summary: PostgreSQL databases with recovery, replication, monitoring, and automatic
  failover
categories:
- data
- databases
- postgresql
---

# PostgreSQL

Blossom runs PostgreSQL 18 as a Database with a stable private endpoint,
generated credentials, engine-aware monitoring, and optional recovery and
high-availability protection.

Users choose the PostgreSQL major version. Blossom publishes a tested minor
release, shows the exact installed release, and installs newer compatible
minor releases during the Account's Preferred Maintenance Window.

## Availability

Choose the outcome when you create the Database instance. Blossom picks the Server
behind it either way, and nothing about the Server is asked or shown.

| Option | What you get |
| --- | --- |
| Shared | Shares your Data Capacity with your other Shared Databases and Caches. You pay for the Capacity and fit as many as their sizes allow. If the Capacity fails, Blossom recovers them together, and connections pause briefly. |
| Dedicated | One PostgreSQL node on its own Server and failure boundary. Recommended for production. |

Both keep the data on separate storage that follows the node when the Server
is replaced, both get a stable private endpoint, and both are reachable only
from linked Environments unless you turn on public access. Standbys and read
replicas are Dedicated features.

## Node And Storage

A Dedicated node runs on 2 vCPU / 4 GB of capacity. A Shared
Database takes a size, Small (0.5 vCPU / 875 MB) by default; see
[Shared Sizes](/docs/databases/#shared-sizes).
Storage is any whole number from 10 to 1,000 GiB. It grows online from
Database Settings or the CLI while PostgreSQL keeps serving, and it
never shrinks.

When a Server fails, Blossom confirms the failure, releases the storage,
creates a replacement Server, reattaches the same storage, and starts
PostgreSQL from the same data. The endpoint does not change. Ordinary recovery
is therefore reattachment, not a restore. The storage is still not a backup;
select Backup Storage for that.

    blossom database_instance:init

writes database_instance.yml:

```yaml
database_instance:
  name: production
  engine: postgres # postgres, mysql, mariadb, or mongodb
  availability: shared # the default where the Location has Data Capacity; or dedicated, its own Server
  storage_gib: 20 # 10 to 1000 GiB; grows online later, never shrinks
  # ...
```

    blossom database_instance:create --data database_instance.yml --follow
    blossom database_instance:update --id database_instance-100 --data '{"database_instance":{"storage_gib":40}}'

## Pricing

A standard Dedicated PostgreSQL node costs $35 in Hetzner EU, $40 on DigitalOcean,
$45 in Singapore, or $55 in Hetzner US per 30 days on Blossom Cloud, plus
$0.15 per provisioned GiB of storage. With Blossom BYOC (bring your own
cloud), a node costs $10 per 30 days, with the Server and disk billed
directly by your provider.

Shared Databases share whole Data Capacity units at the same regional
rates, with each Database's storage billed separately. Blossom BYOC Data
Capacity costs $10 per 2 vCPU / 4 GB unit per 30 days. Compatible Databases
share the funded unit without a per-Database compute fee. See
[Pricing](/docs/databases/#pricing).

Charges follow actual elapsed usage; the estimate appears before you create
the resource. The capacity limit applies to new commitments only: it never
pauses a running Database.
Dedicated Databases are available in every region that carries storage;
Shared Databases are available in Hetzner regions today. See
[Pricing](https://app.blossom88.com/pricing/database-instances).

## Recovery Backups

Select Backup Storage to enable encrypted pgBackRest backups and
continuous WAL archiving. Blossom creates the initial backup automatically and
then runs the account policy. A completed backup can restore an independent
Database, and archived WAL supports recovery to an explicit timestamp.

See [PostgreSQL Recovery Backups](/docs/backups/managed-database/).

## Read Scaling

A PostgreSQL Database can have up to 15 direct read replicas. Every replica
runs independently, remains read-only, and exposes its own stable private
endpoint. Replicas scale application reads; they are not automatic failover
candidates.

## High Availability

One dedicated standby can continuously follow the primary. It is reserved for
recovery so application reads cannot consume the promotion target. Blossom can
perform a planned switchover or promote the standby automatically after it
proves the old primary cannot accept writes.

The primary endpoint remains unchanged through promotion. The former primary
is rebuilt as the new standby, and read replicas are re-seeded from the
promoted timeline.

See [PostgreSQL High Availability](/docs/databases/postgresql-high-availability/).

## Monitoring

The Monitoring view combines connection headroom, container CPU and memory,
available storage, database size, recovery-backup status, WAL archive health,
and a separate replication-lag line for every follower. Select a Database Node
to inspect its role and resource pressure directly.

## Connect

Create an Environment Link with `target_type: DatabaseInstance`. Blossom supplies a
private `DATABASE_URL` containing the generated credentials, endpoint, port,
and database name to every Service in the Environment.

- [Databases](/docs/databases/)
- [Database And Cache Security](/docs/databases/security/)
- [PostgreSQL documentation](https://www.postgresql.org/docs/18/)
