Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e35e705
DC-5044 `prisma-client-js` deprecated (#7219)
aidankmcalister Nov 4, 2025
f8c32d1
DC-5040 Env Vars via Config (#7227)
aidankmcalister Nov 5, 2025
87eba65
urls deprecated (#7226)
aidankmcalister Nov 5, 2025
ac89f6a
minimum version uodated (#7234)
aidankmcalister Nov 7, 2025
3bf085d
DC-5043 Middleware removed from docs (#7233)
aidankmcalister Nov 7, 2025
a4cffaf
DC-6174: Remove adapter, engine, directUrl, studio from config (#7256)
ankur-arch Nov 15, 2025
c2671d7
feat: restructure getting started side nav (#7245)
ankur-arch Nov 15, 2025
32e3082
feat: update .env docs DC-6204 (#7259)
ankur-arch Nov 17, 2025
1db29fe
fix: clarify config file path better (#7261)
ankur-arch Nov 17, 2025
8d21ba4
Update ORM docs (#7260)
AmanVarshney01 Nov 17, 2025
a72eb21
Update guides to use prisma.config.ts (#7243)
nurul3101 Nov 17, 2025
05b7cb0
feat: update ppg for other dbs section (#7264)
ankur-arch Nov 17, 2025
5c857d7
feat: update prisma init related changes in other parts (#7267)
ankur-arch Nov 17, 2025
f489364
Update docs to perform migrations with connection pooling and Prisma …
AmanVarshney01 Nov 17, 2025
50b8d99
feat: add mentions of new Prisma Studio (#7270)
ankur-arch Nov 17, 2025
311bc16
feat: add mention of mongo support coming for P7 (#7271)
ankur-arch Nov 17, 2025
e54a8cd
docs(postgres): remove accelerate reference
mhartington Nov 10, 2025
cae1f1c
Optimised images with calibre/image-actions
github-actions[bot] Nov 11, 2025
30bc667
docs(): update with feedback
mhartington Nov 11, 2025
d6dc975
Optimised images with calibre/image-actions
github-actions[bot] Nov 11, 2025
3d11b9f
docs(ppg): updates
mhartington Nov 17, 2025
83013e4
docs(): update based on feedback
mhartington Nov 17, 2025
858a231
docs(): update based on feedback
mhartington Nov 18, 2025
e2d87a6
Merge branch 'prisma-7' into ppg-no-accelerate
AmanVarshney01 Nov 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -257,4 +257,4 @@ You should see the created user and all users printed to the console!
- [Prisma Postgres documentation](/postgres)
- [Prisma Config reference](/orm/reference/prisma-config-reference)
- [Database connection management](/orm/prisma-client/setup-and-configuration/databases-connections)
- [Cache your queries](/postgres/database/caching#setting-up-caching-in-prisma-postgres)
- [Cache your queries](/postgres/database/caching#setting-up-caching-in-prisma-postgres)
15 changes: 15 additions & 0 deletions content/100-getting-started/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,26 @@ You can also use Prisma Postgres with different tools or ORMs. Pick one of the o
image={'/img/technologies/drizzle.svg'}
tech="Drizzle"
/>
{/* <SquareLogo
url="/getting-started/prisma-postgres/quickstart/typeorm"
image={'/img/technologies/sequelize.svg'}
tech="Sequelize"
/> */}
<SquareLogo
url="/getting-started/setup-prisma/start-from-scratch/relational-databases-typescript-sqlserver"
image={'/img/technologies/sequelize.svg'}
tech="Sequelize"
/>
</List>

<br/>
<br/>

### <Plus color="#16A394" width="24" height="24" /> Add Prisma to your favorite framework?

Working with **Next.js**, **Remix**, or another framework? You can easily add Prisma to your setup in just a few steps and start using it right away.

<List>
<SquareLogo
url="/getting-started/setup-prisma/start-from-scratch/relational-databases-typescript-planetscale"
image={'/img/technologies/typeorm.svg'}
Expand Down
29 changes: 11 additions & 18 deletions content/250-postgres/100-introduction/220-npx-create-db.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,31 +96,24 @@ Here is an example output:
┌ 🚀 Creating a Prisma Postgres database
│ Provisioning a temporary database in us-east-1...
│ It will be automatically deleted in 24 hours, but you can claim it.
◇ Database created successfully!
● Connect to your database →
│ Use this connection string optimized for Prisma ORM:
│ prisma+postgres://accelerate.prisma-data.net/?api_key=...
│ Use this connection string for everything else:
● Database Connection
│ Connection String:
│ postgresql://<username>:<password>@db.prisma.io:5432/postgres
◆ Claim your database →
│ Want to keep your database? Claim for free:
│ Keep your database for free:
│ https://create-db.prisma.io?projectID=proj_...
```


Once you have the output, take the **Prisma ORM-optimized connection string** (`prisma+postgres://...`) and add it to your `.env` file as `DATABASE_URL`:
Once you have the output, take the connection string and add it to your `.env` file as `DATABASE_URL`:

```env
DATABASE_URL="prisma+postgres://accelerate.prisma-data.net/?api_key=..."
DATABASE_URL="postgresql://<username>:<password>@db.prisma.io:5432/postgres"
```

You can now follow the [Prisma Postgres quickstart guide](/getting-started/prisma-orm/quickstart/prisma-postgres) to connect your Prisma project to this database.
Expand Down Expand Up @@ -163,12 +156,12 @@ When you claim a database:

Here are the CLI flags for the `npx create-db` command:

| Flag | Shorthand | Description |
|---------------|-----------|----------------------------------------------------------------------------------------------|
| `--region` | `-r` | Specify a region. <br /> **Available regions:** `ap-southeast-1`, `ap-northeast-1`, `eu-central-1`, `eu-west-3`, `us-east-1`, `us-west-1` |
| `--interactive` | `-i` | Run in interactive mode (select region from a list). |
| `--json` | `-j` | Output machine-readable JSON and exit. |
| `--help` | `-h` | Show this help message. |
| Flag | Shorthand | Description |
|-----------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------|
| `--region` | `-r` | Specify a region. <br /> **Available regions:** `ap-southeast-1`, `ap-northeast-1`, `eu-central-1`, `eu-west-3`, `us-east-1`, `us-west-1` |
| `--interactive` | `-i` | Run in interactive mode (select region from a list). |
| `--json` | `-j` | Output machine-readable JSON and exit. |
| `--help` | `-h` | Show this help message. |


To view all CLI options use the `--help` or `-h` flag:
Expand Down
18 changes: 1 addition & 17 deletions content/250-postgres/100-introduction/250-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ toc: true
It supports the following workflows:

- Schema migrations and queries (via [Prisma ORM](https://www.prisma.io/orm) or any other ORM/database library)
- Connection pooling and caching (via [Prisma Accelerate](https://www.prisma.io/accelerate))
- Connection pooling and caching
- Local database workflows via [`prisma dev`](/postgres/database/local-development)

## Usage metrics
Expand Down Expand Up @@ -63,22 +63,6 @@ When changing your subscription from Free to Starter/Pro/Business or from Starte
This is temporary. In the future, there won't be any downtime when up- or downgrading a plan.
:::

## Bundling with Prisma Accelerate

Prisma Postgres comes bundled with [Prisma Accelerate](/accelerate).

### Using the Client extension for Prisma Accelerate (required)

Because all traffic to Prisma Postgres is routed through Accelerate's connection pool, your project must have the [`@prisma/extension-accelerate`](https://www.npmjs.com/package/@prisma/extension-accelerate) npm package installed. The extension then needs to be applied to the `PrismaClient` instance you use to interact with your database:

```ts
import { PrismaClient } from '@prisma/client'
import { withAccelerate } from '@prisma/extension-accelerate'

const prisma = new PrismaClient()
.$extends(withAccelerate())
```

## Technical details

### PostgreSQL version
Expand Down
3 changes: 0 additions & 3 deletions content/250-postgres/1200-more/1000-faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@ If you previously signed up using GitHub and want to switch to email and passwor
3. Test Your Login
- Log out and try logging in with your email and the password you just created.

:::note

If you encounter any issues, please contact our support team for help linking your accounts.

:::

### VS Code does not recognize the `$extends` method

Expand Down
22 changes: 0 additions & 22 deletions content/250-postgres/1200-more/900-troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,6 @@ npx prisma@latest init --db

This ensures that you're using the most up-to-date CLI, preventing issues with outdated command syntax.

## Warning: In production, we recommend using `prisma generate --no-engine`

### Problem

You're seeing the following error in your logs:

```
prisma:warn: In production, we recommend using 'prisma generate --no-engine'
```

### Cause

Prisma ORM by default uses a [query engine](/orm/overview/) binary that's deployed as part of the `@prisma/client` package. However, with Prisma Postgres, this is not needed.

### Solution

To remove this warning and generate Prisma Client without the query engine, you can run the following command:

```
npx prisma generate --no-engine
```

## Workspace plan limit reached when running `prisma init --db`

### Problem
Expand Down
35 changes: 6 additions & 29 deletions content/250-postgres/300-database/400-connection-pooling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,25 @@ tocDepth: 3
toc: true
---

Prisma Postgres provides built-in [connection pooling](https://www.prisma.io/dataguide/database-tools/connection-pooling) by default, enabled by [Prisma Accelerate](/accelerate/). By using Prisma Postgres, you get the benefits of connection pooling without having to configure anything. The efficient management of database connections allows the database to process more queries without exhausting the available database connections, making your application more scalable.

In some cases, however, it may be beneficial to further configure connection pooling in order to optimize the performance of your application.

:::note

This document focuses on the connection pooling features of Prisma Postgres. For more information about the internal connection pool of Prisma ORM specifically, see our [ORM connection pooling documentation](/orm/prisma-client/setup-and-configuration/databases-connections/connection-pool).

:::
Prisma Postgres provides built-in [connection pooling](https://www.prisma.io/dataguide/database-tools/connection-pooling) without you having to configure anything. The efficient management of database connections allows the database to process more queries without exhausting the available database connections, making your application more scalable.


### Connection pooling in Prisma Postgres

Currently, Prisma Postgres allows a maximum of 10 concurrent database connections per Prisma Schema. This limit is typically sufficient due to Prisma Postgres's efficient unikernel-based architecture, which minimizes the need for large connection pools.

:::note

If you're using **your own database** with Prisma Accelerate, the connection limits differ:
For Prisma Postgres, the connection limit depends on the plan you have signed up for.

- **Free plan**: Maximum of `10` connections.
- **Starter plan**: Maximum of `10` connections. This is often sufficient for most workloads, but if you're expecting high traffic or intensive compute operations, you may want to [increase this limit](#configuring-the-connection-pool-size).
- **Pro plan**: Supports up to `100` concurrent connections.
- **Business plan**: Supports up to `1000` concurrent connections.
| | Free | Starter | Pro | Business |
|---------------------------|------|---------|-----|----------|
| Connection Limit (Pooled) | 10 | 100 | 500 | 1000 |

You can compare plans on the [Prisma pricing page](https://www.prisma.io/pricing).

:::


### Configuring the connection pool size

If you're **not using Prisma Postgres**, you can configure the connection pool size for Prisma ORM by specifying it [in the connection string](/orm/prisma-client/setup-and-configuration/databases-connections/connection-pool#setting-the-connection-pool-size).

For Prisma Postgres, the connection limit is currently **fixed at `10`** and cannot be changed.

If you're using Prisma Accelerate with your own database, you can configure the connection pool size through the `Connection limit` setting in your project on the [Accelerate setup page](/accelerate/getting-started).

### Configuring the connection pool timeout
### Connection pool timeout

The connection pool timeout is the maximum number of seconds that a query will block while waiting for a connection from Prisma Postgres's internal connection pool. This occurs if the number of concurrent requests exceeds the connection limit, resulting in queueing of additional requests until a free connection becomes available. An exception is thrown if a free connection does not become available within the pool timeout. The connection pool timeout can be disabled by setting the value to 0.

Similar to the connection pool size, you may also configure the connection pool timeout via the _database connection string_. To adjust this value, you may add the `pool_timeout` parameter to the database connection string.

For example:

Expand Down
20 changes: 1 addition & 19 deletions content/250-postgres/300-database/550-local-development.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,13 @@ sidebar_class_name: preview-badge

[Prisma Postgres](/postgres) is a production-grade, cloud-native database and is ideal for staging and production environments. For rapid iteration and isolated testing, you can run a _local_ Prisma Postgres instance (powered by [PGlite](https://pglite.dev)) via the `prisma dev` command. This page explains how to install and launch a local Prisma Postgres database.

:::note

Local Prisma Postgres is in [Preview](/orm/more/releases#preview) and is being actively developed.

:::

## Setting up local development for Prisma Postgres

Follow these steps to set up local Prisma Postgres for development.

:::note

Please ensure you're running Node.js 20 or later, as it's required for local Prisma Postgres.

:::
Node.js v20 or later is required for local Prisma Postgres

### 1. Launching local Prisma Postgres

Expand Down Expand Up @@ -58,16 +50,6 @@ If you want to connect via Prisma ORM, hit <kbd>h</kbd> on your keyboard, copy t
DATABASE_URL="prisma+postgres://localhost:51213/?api_key=__API_KEY__"
```

The `DATABASE_URL` is a connection string that Prisma uses to connect to the local Prisma Postgres server and is compatible with the [Prisma Postgres extension](https://www.npmjs.com/package/@prisma/extension-accelerate):

```ts
import { withAccelerate } from '@prisma/extension-accelerate'

const prisma = new PrismaClient().$extends(withAccelerate())
```

This ensures no additional code changes are needed when switching from local Prisma Postgres to Prisma Postgres in production.

Keep the local Prisma Postgres server running in the background while you work on your application.

### 2. Applying migrations and seeding data
Expand Down
20 changes: 9 additions & 11 deletions content/250-postgres/300-database/650-direct-connections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ toc: true

## Overview

Prisma Postgres is the perfect choice for your applications, whether you connect to it via [Prisma ORM](/orm) or any other ORM, database library / tool of your choice. If you use it with Prisma ORM, Prisma Postgres comes with built-in connection pooling and an integrated caching layer (powered by [Prisma Accelerate](/accelerate/)).
Prisma Postgres is the perfect choice for your applications, whether you connect to it via [Prisma ORM](/orm) or any other ORM, database library / tool of your choice. If you use it with Prisma ORM, Prisma Postgres comes with built-in connection pooling, and an integrated caching layer (powered by [Prisma Accelerate](/accelerate/)).

If you connect to it via another tool, you can do so with a [direct connection string](#connection-string) following the conventional PostgreSQL format.

Expand All @@ -18,10 +18,12 @@ In order to get a direct connection string, you need to:

1. Open a project in your [Prisma Console](https://console.prisma.io) account (or create a new one)
1. Navigate to your active Prisma Postgres instance.
1. Click the **API Keys** tab in the project's sidenav.
1. Click the **Create API key** button.
1. In the popup, provide a **Name** for the API key and click **Create**.
1. Copy the connection string starting with `postgres://`, this is your direct connection string.
1. Click the **Connect to your database** button in your dashboard.
1. Click the **Generate new connection string** button.
1. If enabling connection pooling, click the toggle button
1. Copy the connection string that is generated below.

![](/img/postgres/connection-string.png)

## Connection string

Expand All @@ -45,7 +47,7 @@ SSL mode is required when connecting to Prisma Postgres via direct TCP, so you n

## Billing

When using direct TCP to connect to a Prisma Postgres instance, every SQL query is counted as a [billable operation](/postgres/introduction/overview#usage-based-pricing). Learn more on our [pricing page](https://www.prisma.io/pricing).
When using direct TCP to connect to a Prisma Postgres instance, every request is counted as a [billable operation](/postgres/introduction/overview#usage-based-pricing). Learn more on our [pricing page](https://www.prisma.io/pricing).

## Temporary limitations

Expand All @@ -55,16 +57,12 @@ Prisma Postgres closes idle connections after an extended period of time. If tha

### Connection limit

While direct connections are in Early Access, the following connection limits apply:

| | Free | Starter | Pro | Business |
| ------------------------------------ | ---------------- | ---------------- | ---------------- | ---------------- |
| **Connection limit** | Max 10 | Max 10 | Max 50 | Max 100 |

### Query and transaction timeouts

While direct connections are in Early Access, the following timeouts apply:

| | Free | Starter | Pro | Business |
| ------------------------------------ | ---------------- | ---------------- | ---------------- | ---------------- |
| **Query timeout** | Up to 10 seconds | Up to 10 seconds | Up to 10 seconds | Up to 10 seconds |
Expand Down Expand Up @@ -190,4 +188,4 @@ When using the TCP tunnel, keep the following in mind:
- The tunnel does not support schema management (i.e., DDL queries outside of Prisma Migrate).
- The tunnel should not be exposed to untrusted networks.
- Always store API keys securely and avoid hardcoding them.
- Ensure that only necessary users have direct access to the Prisma Postgres database.
- Ensure that only necessary users have direct access to the Prisma Postgres database.
Loading
Loading