Skip to content
Merged
2 changes: 1 addition & 1 deletion about/pricing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Monthly Machine prices assume 30 days of continuous runtime. Machines are billed
| SSL certificates | \$0.10/month per single hostname; \$1/month per wildcard | First 10 single-hostname certificates are free |
| Outbound data to the internet | \$0.02/GB in North America and Europe<br/>\$0.04/GB in Asia Pacific, Oceania, and South America<br/>\$0.12/GB in Africa and India | Inbound data is free |
| Private network data between regions | \$0.006/GB in North America and Europe<br/>\$0.015/GB in Asia Pacific, Oceania, and South America<br/>\$0.050/GB in Africa and India | Data transfer within a region is free. Different rates apply to some older organizations; see [data transfer pricing](#data-transfer-pricing) |
| Managed Postgres | \$38/month (Basic) to \$1,922/month (Performance) | Storage is \$0.28/GB/month based on usage. See [Managed Postgres pricing](/postgres#pricing) |
| Managed Postgres | \$4/month (Developer) to \$1,922/month (Performance) | The Developer plan includes storage. On other plans, storage is \$0.28/GB/month based on usage. See [Managed Postgres pricing](/postgres#pricing) |
| Support | \$29/month Standard; \$199/month Premium; Enterprise starts at \$2,500/month | Optional. Community support is free |
| Extensions such as Tigris and Upstash | Provider's list price | Pricing is set by the extension provider and charges appear on your Fly.io invoice |
| App builders and registry image storage | No charge | Building images with Depot or Fly builders, and storing images in the Fly.io registry, are currently free. See [App builders](#app-builders) |
Expand Down
2 changes: 1 addition & 1 deletion about/support.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ You can find your support address is in the [Fly.io dashboard](https://fly.io/da

### Support Portal

**Who can use this:** Organizations who have purchased a Standard, Premium, or Enterprise Support package or organizations with legacy Launch or Scale plans. Organizations with a Managed Postgres (MPG) database cluster also have access to our Support Portal for issues related to MPG.
**Who can use this:** Organizations who have purchased a Standard, Premium, or Enterprise Support package or organizations with legacy Launch or Scale plans. Organizations with a Managed Postgres (MPG) database cluster on any plan except [Developer](/postgres/developer-plan) also have access to our Support Portal for issues related to MPG.

**Use this for:** Technical support for issues or questions specific to you.

Expand Down
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@
"group": "Getting Started",
"pages": [
"postgres/create-and-connect",
"postgres/developer-plan",
"postgres/client-configuration",
"postgres/cluster-configuration"
]
Expand Down
6 changes: 5 additions & 1 deletion postgres/client-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ After [creating your MPG cluster](/postgres/create-and-connect) and attaching yo
- **Pooled URL** (default): `postgresql://fly-user:YOUR_PASSWORD@pgbouncer.YOUR_CLUSTER.flympg.net/fly-db` — routes through PgBouncer. Use this for your application.
- **Direct URL**: `postgresql://fly-user:YOUR_PASSWORD@direct.YOUR_CLUSTER.flympg.net/fly-db` — bypasses PgBouncer. Use this for migrations, advisory locks, or `LISTEN/NOTIFY`.

On the [Developer plan](/postgres/developer-plan), there's no PgBouncer. Use the direct URL, which `fly mpg attach` sets for you.

SSL is enabled by default on all MPG connections. You do not need to set `sslmode` in your connection string.

**2. Set connection lifetime and idle timeout in your code.** These are settings you configure in your application's database client or connection pool library — not on the database or cluster side. Not all client libraries support these settings directly — see the [language-specific examples](#language-specific-configuration) below.
Expand Down Expand Up @@ -54,7 +56,7 @@ The fix is straightforward: configure your connection pool to **proactively recy

## PgBouncer mode and your client

All MPG clusters include PgBouncer for connection pooling. The pool mode you choose on the cluster side affects what your client can do. See [Cluster Configuration](/postgres/cluster-configuration) for how to change modes.
All MPG clusters except those on the [Developer plan](/postgres/developer-plan) include PgBouncer for connection pooling. The pool mode you choose on the cluster side affects what your client can do. See [Cluster Configuration](/postgres/cluster-configuration) for how to change modes.
Comment thread
kcmartin marked this conversation as resolved.
Resolved

**Session mode** (default): A PgBouncer connection is held for the entire client session. Full PostgreSQL feature compatibility — prepared statements, advisory locks, `LISTEN/NOTIFY`, and multi-statement transactions all work normally. Lower connection reuse.

Expand Down Expand Up @@ -257,6 +259,8 @@ Each MPG plan has a fixed number of PgBouncer connection slots shared across all
| Scale | 1000 | 300 | 50 |
| Performance | 1000 | 300 | 50 |

The Developer plan has no PgBouncer. It allows up to 20 connections straight to Postgres, shared by all your clients.

**Max client connections** is the total number of client connections PgBouncer will accept. **Max database connections** is the number of actual connections PgBouncer opens to PostgreSQL. The reserve pool handles bursts above the normal pool size.

### Common connection limit errors
Expand Down
4 changes: 2 additions & 2 deletions postgres/cluster-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ source_url: https://fly.io/docs/mpg/cluster-configuration/

## Connection Pooling

All Managed Postgres clusters come with PGBouncer for connection pooling, which helps manage database connections efficiently. You can configure how PGBouncer assigns connections to clients by changing the pool mode.
All Managed Postgres clusters except those on the [Developer plan](/postgres/developer-plan) come with PGBouncer for connection pooling, which helps manage database connections efficiently. You can configure how PGBouncer assigns connections to clients by changing the pool mode.

For configuring your application's connection pool settings (lifetime, idle timeout, pool size, and language-specific examples), see [Connect Your Client](/postgres/client-configuration).

Expand Down Expand Up @@ -48,7 +48,7 @@ To change the pool mode for your cluster:

## Changing your MPG Plan

Your Managed Postgres Plan determines the amount of resources your cluster has. All plans include a primary and replica, pg bouncers, and backups. You can change your cluster's plan at any time and the machines in the cluster will be updated to their new resources.
Your Managed Postgres Plan determines the amount of resources your cluster has. All plans include a primary and replica, and backups. All plans except Developer include PgBouncer. You can change your cluster's plan at any time and the machines in the cluster will be updated to their new resources.

In order to change your plan:

Expand Down
27 changes: 19 additions & 8 deletions postgres/create-and-connect.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
- Cluster name (must be unique within your organization)
- Region (see [available MPG regions](/reference/regions))
- A plan with predefined hardware resources:
- [Developer](/postgres/developer-plan): 1 shared vCPU, 256MB RAM
- Basic: 2 shared vCPUs, 1GB RAM
- Starter: 2 shared vCPUs, 2GB RAM
- Launch: 2 Performance vCPUs, 8GB RAM
- Scale: 4 Performance vCPUs, 32GB RAM
- Performance: 8 Performance vCPUs, 64GB RAM
- Initial storage size: Up to 500 GB at creation
- Initial storage size: Up to 500 GB at creation. Developer plan clusters start at 1GB and can grow to 5GB
- Optional PostGIS support. Other extensions, including pgvector, are enabled after creation from the [Extensions page](/postgres/extensions)

<div>
Expand All @@ -38,21 +39,31 @@
```bash
fly mpg create
```
Follow the prompts to configure your cluster name, plan, and region. By default your cluster will be created with a 10GB initial volume, which grows automatically with your data; you can start larger using the `--volume-size` flag:
Follow the prompts to configure your cluster name, plan, and region. By default your cluster will be created with a 10GB initial volume (1GB on the Developer plan), which grows automatically with your data; you can start larger using the `--volume-size` flag:

<CodeGroup>
```bash cmd
fly mpg create [flags]
```
```out out
-n, --name string The name of your Postgres cluster
-o, --org string The target Fly.io organization
--plan string The plan to use for the Postgres cluster (basic, launch, scale)
-r, --region string The target region
--volume-size int Initial volume size in GB (default 10)
--enable-postgis-support Enable PostGIS for the Postgres cluster
-n, --name string The name of your Postgres cluster
-o, --org string The target Fly.io organization
--pg-major-version int The major version of Postgres to use for
the Postgres cluster. Supported versions
are 16, 17 and 18. (default 17)
--plan string The plan to use for the Postgres
cluster: Dev-256, Basic, Starter,
Launch, Scale, Performance
-r, --region string The target region (see 'flyctl platform
regions')
--volume-size int Initial volume size in GB. Defaults to
the plan's size.
```
</CodeGroup>

To create a Developer plan cluster, use `--plan dev-256`.

After all options are set the cluster will begin initializing. Once that's complete, you can now connect to your cluster.

## Attach an application to your Managed Postgres Database
Expand All @@ -74,9 +85,9 @@
```bash
fly mpg attach <CLUSTER_ID> -a <app-to-attach>
```
This will also trigger a restart of the selected app in order to add the secret. You can find the cluster ID in your MPG dashboard or by using the `fly mpg list` command.

Check warning on line 88 in postgres/create-and-connect.mdx

View workflow job for this annotation

GitHub Actions / Vale linter

[vale] reported by reviewdog 🐶 Consider using 'to' instead of 'in order to'. Raw Output: {"message":"Consider using 'to' instead of 'in order to'.","location":{"path":"postgres/create-and-connect.mdx","range":{"start":{"line":88,"column":54},"end":{"line":88,"column":65}}},"severity":"INFO","code":{"value":"Fly.WordList"}}

Both of the attachment options will use the pooled connection URL, which uses PGBouncer to help manage database connections efficiently. This is recommended for most apps.
Both of the attachment options will use the pooled connection URL, which uses PGBouncer to help manage database connections efficiently. This is recommended for most apps. On the [Developer plan](/postgres/developer-plan), which has no PgBouncer, they use the direct URL instead.

### Manually connect an application using a connection string

Expand Down
115 changes: 115 additions & 0 deletions postgres/developer-plan.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
---
title: Managed Postgres Developer plan
sidebarTitle: Developer plan
description: "Run a small, highly available Managed Postgres cluster for $4 a month on the Developer plan: what it includes, its limits, auto-pause, and how to upgrade."
---

**The Developer plan is Managed Postgres for side projects, prototypes and small apps. You get a highly available, two-node Postgres cluster with daily backups for \$4 a month.**

## What the Developer plan includes

- **High availability:** a primary and a replica, each on a `shared-cpu-1x` Machine with 256MB of memory, with automatic failover.
- **Daily backups:** one full backup a day, kept for 1 day. See [Backups](#backups).
- **Storage:** 1GB to start, growing automatically up to 5GB.
- **Up to 20 connections**, straight to Postgres.
- **Auto-pause:** the cluster pauses when nothing is connected and wakes on the next connection. See [Auto-pause](#auto-pause).
- Everything else in [Managed Postgres](/postgres): encryption, [extensions](/postgres/extensions), [metrics](/postgres/metrics), and access from your organization's [private network](/networking/private-networking).

## Pricing

The Developer plan costs **\$4 for 30 days**, including storage, billed by the second like every Managed Postgres plan. You're billed while the cluster exists, including the time it's paused, so a cluster you delete partway through the month costs less.

The Developer plan is included in the [Free plan](/about/free-plan). A Free plan organization can have one Developer plan cluster, and its cost counts toward the \$5 of monthly usage.

## How it differs from other plans

The Developer plan is smaller and simpler than the other [Managed Postgres plans](/postgres#pricing):

| | Developer | Basic and up |
| --- | --- | --- |
| Memory per node | 256MB | 1GB and up |
| Connection pooling (PgBouncer) | No. Clients connect to Postgres directly | Yes |
| Connections | Up to 20 | Depends on plan |
| Storage | Up to 5GB | Up to 1TB |
| Storage cost | Included in the \$4 | \$0.28/GB a month |
| Backups | One full backup a day, kept for 1 day | Kept for 10 days |
| Restore | From a backup only | From a backup or a point in time |
| Maintenance | Any time | In a [weekly window](/postgres/maintenance-windows) you choose |
| Auto-pause | Yes | No |
| Support | No direct support contact. We still respond to alerts on your cluster | Direct support from Fly.io |
Comment thread
kcmartin marked this conversation as resolved.
Resolved

## Backups

We take one full backup of your cluster a day, and keep it for 1 day. That gives you about a day to restore from if something goes wrong, so keep your own copy of anything you can't lose, for example with `pg_dump`.

You can restore from a backup, but not to a point in time. On-demand backups are full backups only. `fly mpg backup create --type incr` returns an error on the Developer plan.

## Maintenance

Developer plan clusters don't have a maintenance window. We can run maintenance at any time. We work to avoid downtime, but your app may see short interruptions, so make sure it reconnects when a connection drops.

## Auto-pause

A Developer plan cluster pauses after 15 minutes with no client connections. While it's paused, the dashboard shows that it wakes on the next connection.

When a client connects, the cluster wakes. This usually takes about 15 seconds, and can take up to 25. The connection waits for the cluster to wake, so set your client's connection timeout to at least 30 seconds.

## Storage limit

Your cluster starts with 1GB of storage and grows automatically, 1GB at a time, up to 5GB.

The 5GB holds your data and Postgres's write-ahead log (WAL), so your data runs out of room before it reaches 5GB.

When your cluster gets close to 5GB, we email you. Upgrade to Basic or a larger plan before it fills up. A full disk takes your database down: when Postgres can't write its WAL, it crashes and restarts.

## Create a Developer plan cluster

In the dashboard, create a Managed Postgres cluster as usual and choose the **Developer** plan. See [Create and connect to a cluster](/postgres/create-and-connect).

With flyctl:

```bash
fly mpg create --plan dev-256
```

You need flyctl v0.5.15 or later. Run `fly version upgrade` if your flyctl doesn't list the Developer plan.

Your cluster gets a 1GB volume by default.
Comment thread
kcmartin marked this conversation as resolved.
Resolved

## Connect to your cluster

Attach your app to the cluster:

```bash
fly mpg attach <cluster-id> -a <app-name>
```

This sets a `DATABASE_URL` secret on your app. On the Developer plan, it's the cluster's direct URL, which connects straight to Postgres. If your app already has a `DATABASE_URL` secret, choose another name with `--variable-name`. See [`fly mpg attach`](/flyctl/cmd/fly_mpg_attach).

You don't need PgBouncer settings, such as disabling prepared statements for transaction mode. Keep your app's connection pool small, since all your clients share the 20 connections.

The direct URL keeps working if you upgrade to a larger plan. To use PgBouncer after an upgrade, attach again to get the pooled URL:

```bash
fly secrets unset DATABASE_URL -a <app-name>
fly mpg attach <cluster-id> -a <app-name>
```

The pooled URL uses PgBouncer in transaction mode. If your app uses prepared statements, `SET`, advisory locks or `LISTEN/NOTIFY`, keep the direct URL, or change the pool mode to session first. See [Connection pooling](/postgres/cluster-configuration#connection-pooling).

See [Connect your client](/postgres/client-configuration).

## Upgrade to a larger plan

You can move a Developer plan cluster to Basic or a larger plan at any time from the dashboard. Your disk grows to the new plan's default size, 10GB on Basic. Your app keeps using the direct URL. See [Connect to your cluster](#connect-to-your-cluster). You can't move a cluster from another plan to the Developer plan.

On the [Free plan](/about/free-plan), upgrade your organization to Pay As You Go before you move the cluster to a larger plan.

See [Changing your MPG plan](/postgres/cluster-configuration#changing-your-mpg-plan).

## Related reading

- [Managed Postgres overview](/postgres)
- [Create and connect to a cluster](/postgres/create-and-connect)
- [Connect your client](/postgres/client-configuration)
- [Fly.io Resource Pricing](/about/pricing)
Loading
Loading