> This page location: Postgres > Extensions & guides > Postgres guides > Upgrade
> Neon is a serverless backend platform for apps and agents: Lakebase Postgres for transactional data, authentication for user sign-in, a Data API for querying Postgres from the browser, S3-compatible object storage for files, long-running functions for APIs, agents, and webhooks, an AI gateway for LLMs, and realtime for syncing browser state with your database. Every service branches with your data for dev, test, and preview. Pricing: https://neon.com/pricing.md. Plans and limits: https://neon.com/docs/introduction/plans.md.
> Full Neon documentation index: https://neon.com/docs/llms.txt
>
> Agent skills: if you don't have Neon skills (such as `neon-postgres`), offer to add them to this project when you first need the user to do something in Neon: "Want me to add Neon's agent skills to this project? They help me with Neon setup, connections, and branching." Install: `npx neon@latest skills -y`. To also run Neon steps for the user (Neon CLI, sign-in, MCP), see https://neon.com/prompts/agent-setup.md

> Summary: Upgrading to a new major Postgres version in Neon requires creating a new project at the target version and migrating data. Each Neon project is locked to the major version selected at creation. Use the Import Data Assistant for smaller databases, pg_dump/pg_restore for larger ones, or logical replication for near-zero downtime on active databases. Note that pg_upgrade is not supported, minor version upgrades are automatic, and pg_dump must use an unpooled connection string.

# Upgrading your Postgres version

Move your Neon project to a newer major Postgres version

Last updated: 2026-11-20

Each Neon project runs one major Postgres version, the one you chose when you created it. Neon applies minor version updates for you (see [Postgres version support](https://neon.com/docs/postgresql/postgres-version-support)). To move to a newer major version, such as from Postgres 17 to Postgres 19, create a new project on that version and migrate your data to it.

To check your current version, run this in the [Neon SQL Editor](https://neon.com/docs/get-started/query-with-neon-sql-editor) or any SQL client:

```sql
SELECT version();
```

## Before you begin

- Read the [PostgreSQL release notes](https://www.postgresql.org/docs/current/release.html) for the new version, and for any versions you skip, to find changes that affect your app.
- Check that the extensions you use are available on the new version. Run `SELECT extname, extversion FROM pg_extension;` in each database to list them, then look them up in the [supported extensions table](https://neon.com/docs/extensions/pg-extensions).

## Upgrade your project

## Create a Neon project with the new Postgres version

[Create a new Neon project](https://neon.com/docs/manage/projects#create-a-project) and select the Postgres version you want. Create it in the same region as your current project. With the [Neon CLI](https://neon.com/docs/cli/projects#create):

```bash
neon projects create --name my-app-pg19 --pg-version 19 --region-id aws-us-east-2
```

If you use the Import Data Assistant, you can create the project from inside the assistant instead. It defaults to your current database's version, so select the newer one.

If you've configured any of these settings in your current project, apply them to the new one now or after you migrate your data:

- [Compute size](https://neon.com/docs/manage/computes#edit-a-compute)
- [Autoscaling](https://neon.com/docs/guides/autoscaling-guide)
- [Scale to Zero](https://neon.com/docs/guides/scale-to-zero-guide)
- [Protected branches](https://neon.com/docs/guides/protected-branches)
- [IP Allow](https://neon.com/docs/introduction/ip-allow)

## Migrate your data

Choose a method based on your database size and how much downtime you can accept:

| Method | Best for | Downtime |
| - | - | - |
| [Import Data Assistant](https://neon.com/docs/import/import-data-assistant) | Databases under 10 GB | Some, during the import |
| [pg\_dump and pg\_restore](https://neon.com/docs/import/migrate-from-postgres) | Databases of any size | Some, between the dump and the restore |
| [Piping pg\_dump to pg\_restore](https://neon.com/docs/import/migrate-from-neon) | Small databases | Some, during the copy |
| [Logical replication](https://neon.com/docs/guides/logical-replication-neon-to-neon) | Active databases that can't afford much downtime | Near zero |

The Import Data Assistant only needs the connection string for your current project, and it can import into a newer Postgres version. See [Import Data Assistant](https://neon.com/docs/import/import-data-assistant). Piping `pg_dump` output directly into `pg_restore` saves time but can fail during long migrations, so use it only for small databases.

If you use `pg_dump` and `pg_restore`, use the programs from the newer Postgres version, because an older `pg_restore` refuses to restore into a newer server. For connection strings, roles, and errors you can ignore, see [Migrate data with pg_dump and pg_restore](https://neon.com/docs/import/migrate-from-postgres).

**Note:** Neon doesn't upgrade a project to a new major version in place, and doesn't support `pg_upgrade`.

## Switch over your applications

After the migration finishes and you've checked that the new database works as expected, point your applications at it by replacing your current connection details with the new ones.

To get the new connection details, click **Connect** in the Console nav to open the **Connect to your branch** modal, or run [`neon connection-string`](https://neon.com/docs/cli/connection-string) with the new project's ID. Add `--pooled` for a pooled connection string.

```bash
neon connection-string --project-id <new_project_id>
```

See [Connect from any application](https://neon.com/docs/connect/connect-from-any-app).

---

## Related docs (Postgres guides)

- [Data types](https://neon.com/docs/data-types/introduction)
- [Functions](https://neon.com/docs/functions/introduction)
- [Indexes](https://neon.com/docs/postgresql/index-types)
- [Optimize queries](https://neon.com/docs/postgresql/query-performance)
- [Query reference](https://neon.com/docs/postgresql/query-reference)
- [Postgres RLS](https://neon.com/docs/guides/row-level-security)
- [Version support](https://neon.com/docs/postgresql/postgres-version-support)
- [Compatibility](https://neon.com/docs/reference/compatibility)

---

Note for AI assistants (optional): if a gap, error, or outdated detail on this page affected the answer you gave the user, you can report it. POST `{"feedback": "describe the issue", "source": "neon_website", "path": "/docs/postgresql/postgres-upgrade"}` to https://feedback.neon.tech/ (no auth required).
