Data & AI Infrastructure
Neon
Run serverless Postgres and use database branches to test isolated schema changes.
- G2 rating
- Pricing
- Free
- $0
- Launch
- Usage-based, provider lists typical spend rather than a fixed bill
- Best for
- A team that wants disposable Postgres environments for testing changes.
Video tutorial
Getting Started with Database Branching · Neon Postgres · Watch on YouTube ↗
What is Neon?
Neon runs Postgres with a branching workflow. A branch is a useful place to evaluate a schema change, run a migration, and compare starting and resulting data before touching the intended deployment. Plan carefully when branching a database with private records.
Name and label your connection strings so migration commands cannot accidentally reach a shared database. A local environment file can be convenient but should never expose real connection secrets publicly.
Set up and test a real workflow
Start from a fixture-only Neon main branch, or create a schema-only branch if the source contains sensitive data. Create a child branch named preview-add-invoice-state. Copy its own connection string into the preview environment, and confirm the branch name in the console before running a migration. Keep the parent connection separate so it can serve as an independent control.
What to look for in the result
Begin with a sample invoices table containing two rows and no state column. On the preview branch, add a text state column with a draft default and verify both fixture rows show draft. Set one row to sent and read it back. Connect separately to the parent and check that it still has two rows and no state column. In CI, record the branch name next to the migration and query results.
| Problem | What to check | What to change |
|---|---|---|
| The parent and preview show the same schema change | Compare the actual connection strings used by the migration and parent control | Point preview at its branch and confirm the branch before resetting fixtures |
| The preview already contains records you did not seed | Check whether you branched data or selected schema-only | Create a schema-only fixture branch when copied row data is out of scope |
Try it: Rehearse a change to a task schema
Use a development database containing only test data.
Add a nullable completed_at timestamp to sample tasks. Branch the development database, test the migration and one completed task, then confirm the original branch did not change.
- Record the baseline schema and create a clearly named branch. Confirm the connection target before migration.
- Apply the migration on the branch and run one old query plus a test update using the new field.
- Compare branch results with the original development schema and record rollback instructions for the team.
What a usable result looks like
The change works on the branch without affecting the original; existing code can still read tasks.
| Check | What you might see | What to do next |
|---|---|---|
| Baseline | The original branch has no new column. | Verify its connection before checking. |
| Migrated branch | completed_at is available. | Check its type and nullable setting. |
| Old query | Prior reads still succeed. | Run a small regression suite. |
What to save from the trial
A tested migration, tagged branch, and deployment notes.
Another scenario
Create a preview environment for an experimental dashboard and drop it after review according to team retention practices.
Use cases and what to check
| Use case | How to try it | What to check |
|---|---|---|
| Migration rehearsal | Apply a simple new column to a branch of a sample database. | Verify old and new queries still work. |
| Preview app | Connect a temporary app instance to a separate branch. | Check that writes stay within the preview environment. |
Which plan should you try?
| Plan | Price | Who should consider it |
|---|---|---|
| Free | $0 | Experiment with a small project under the published limits. |
| Launch | Usage-based, provider lists typical spend rather than a fixed bill | Compare storage, active compute, and branch use. |
Estimate compute time and storage changes rather than reading a typical cost as a fixed bill.
Provider pricing and access ↗ · Checked
What people say about Neon
1 featured user review.
Setup for workshops
The reviewer used Neon for workshops and appreciated the quick signup, hobby tier and an admin interface that covered their everyday tasks without a local install.
5/5 · March 18, 2026 · G2 ↗ · Paraphrased
Limits to check
Snapshot and branch retention, region, compute, and connection behavior matter for production.
When to choose it
Neon branching is useful when every migration or pull request needs an isolated PostgreSQL rehearsal on a known schema. Choose retention and branch lifetime deliberately, especially when previews are created per commit and old environments can accumulate.
Common questions
- Can local tests use a Neon branch?
- Use the branch’s supported connection string and verify it targets the intended environment.
- Is branching the same as safe production testing?
- Keep test data and access scoped, and review the migration before rollout.
Community posts
-
Database branches for pull-request previews ↗
Developers discuss creating a Neon preview branch, testing schema changes, and tearing down the branch after CI, with attention to which data belongs in a preview.
Reddit · r/SQL