-
Notifications
You must be signed in to change notification settings - Fork 897
chore(docs): postgres page edits #7578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,81 +1,103 @@ | ||
| --- | ||
| title: Prisma Postgres | ||
| description: 'The easiest way to use PostgreSQL with built-in connection pooling, real-time subscriptions, and a powerful data browser' | ||
| description: 'Connect to Prisma Postgres from Prisma ORM, serverless runtimes, and PostgreSQL clients.' | ||
| url: /postgres | ||
| metaTitle: Overview | Prisma Postgres | ||
| metaDescription: Learn everything you need to know about Prisma Postgres. | ||
| --- | ||
|
|
||
| [Prisma Postgres](https://www.prisma.io/postgres?utm_source=docs) supports the following workflows: | ||
| [Prisma Postgres](https://www.prisma.io/postgres?utm_source=docs) is a managed PostgreSQL service built for modern app development. | ||
| Use this page to choose a connection path and get started quickly. | ||
|
|
||
| - Schema migrations and queries (via [Prisma ORM](https://www.prisma.io/orm) or any other ORM/database library) | ||
| - Connection pooling and caching | ||
| - Local database workflows via [`prisma dev`](/postgres/database/local-development) | ||
| ## Getting started | ||
|
|
||
| ## Usage metrics | ||
| ### Create a database | ||
|
|
||
| You can view the following usage metrics in your Console Dashboard: | ||
| New to Prisma Postgres? Start here. | ||
|
|
||
| - Key metrics | ||
| - Estimated upcoming invoice | ||
| - Total storage used | ||
| - Total DBs | ||
| - Overall usage | ||
| - Cumulative operations | ||
| - Operations per day | ||
| <Cards> | ||
| <Card href="/postgres/npx-create-db" title="Create a temporary database with create-db"> | ||
| Create a temporary Prisma Postgres database in one command. | ||
| </Card> | ||
| <Card href="/prisma-orm/quickstart/prisma-postgres" title="Prisma Postgres quickstart with Prisma ORM"> | ||
| Set up Prisma ORM and connect it to Prisma Postgres. | ||
| </Card> | ||
| </Cards> | ||
|
|
||
| For details into individual databases in your workspace, each database has it's own metrics report | ||
| as well. You can view the following: | ||
| ### Get your connection string | ||
|
|
||
| - Average response size | ||
| - Average query duration | ||
| - Total egress | ||
| - Total operations | ||
| - Cache utilization | ||
| In [Prisma Console](https://console.prisma.io), open your database and click **Connect to your database** to copy connection URLs. | ||
|
|
||
| ## Billing | ||
| ## Choose a connection type | ||
|
|
||
| ### Usage-based pricing | ||
| ### Prisma ORM (recommended default) | ||
|
|
||
| Prisma Postgres charges for: | ||
| Use Prisma ORM for migrations and type-safe queries. | ||
|
|
||
| - number of operations | ||
| - storage (in GiB) | ||
| <Cards> | ||
| <Card href="/prisma-orm/quickstart/prisma-postgres" title="Prisma Postgres quickstart"> | ||
| Get started with the recommended Prisma ORM workflow. | ||
| </Card> | ||
| </Cards> | ||
|
|
||
| An _operation_ is counted each time you perform a create, read, update, or delete, regardless of how simple or complex the underlying SQL is. Whether it's a single-row lookup or complex JOIN query, it still counts as one operation and costs the same. Read our blog post on [operations-based billing](https://www.prisma.io/blog/operations-based-billing?utm_source=docs) for more details. | ||
| ### Any PostgreSQL client or ORM | ||
|
|
||
| By treating every operation equally, you don't have to worry about write-heavy workloads driving up your bill or high-bandwidth requests ballooning costs unexpectedly. You can [directly correlate your database costs to real product usage and user behavior](/postgres/faq#is-there-a-sample-workload-to-estimate-my-expected-charges), making forecasting and budgeting simple and predictable. | ||
| Use Prisma Postgres with `psql`, GUI tools, `node-postgres`, or other ORMs. | ||
|
|
||
| You can view your usage and billing details in the dashboard for your current workspace. | ||
| <Cards> | ||
| <Card href="/prisma-postgres/quickstart/kysely" title="Kysely quickstart"> | ||
| Connect Prisma Postgres from Kysely. | ||
| </Card> | ||
| <Card href="/prisma-postgres/quickstart/drizzle-orm" title="Drizzle ORM quickstart"> | ||
| Connect Prisma Postgres from Drizzle ORM. | ||
| </Card> | ||
| <Card href="/prisma-postgres/quickstart/typeorm" title="TypeORM quickstart"> | ||
| Connect Prisma Postgres from TypeORM. | ||
| </Card> | ||
| <Card href="/postgres/database/direct-connections" title="Direct TCP connections"> | ||
| Use standard PostgreSQL connection strings over TCP. | ||
| </Card> | ||
| </Cards> | ||
|
|
||
|  | ||
| ### Serverless and edge runtimes | ||
|
|
||
| Learn more on our [pricing page](https://www.prisma.io/pricing). | ||
| Use the serverless driver for HTTP/WebSocket connectivity in edge or constrained runtimes. | ||
|
|
||
| ### Spend limits | ||
| - [Serverless driver (`@prisma/ppg`)](/postgres/database/serverless-driver) | ||
|
|
||
| Prisma Postgres allows you to set limits to ensure you never get a surprise bill. You'll receive alerts when you reach 75% of your set limit, and if you reach 100%, your database will be paused. This ensures you'll never have an unexpected bill, and you can always be in complete control of your spending. Spend limits are available on all paid plans. | ||
| ### Local development | ||
|
|
||
| ### Restarting your database when changing your subscription | ||
| Run Prisma Postgres locally with `prisma dev`, then switch to cloud when ready. | ||
|
|
||
| When changing your subscription from Free to Starter/Pro/Business or from Starter/Pro/Business to Free, your database instance is being restarted. This may cause a downtime of ~1second. | ||
| - [Local development](/postgres/database/local-development) | ||
|
|
||
| :::note | ||
| This is temporary. In the future, there won't be any downtime when up- or downgrading a plan. | ||
| ::: | ||
| ## Optimize and manage | ||
|
|
||
| ## Technical details | ||
| - [Connection pooling](/postgres/database/connection-pooling) | ||
| - [Caching](/postgres/database/caching) | ||
| - [Backups](/postgres/database/backups) | ||
| - [PostgreSQL extensions](/postgres/database/postgres-extensions) | ||
| - [Troubleshooting](/postgres/troubleshooting) | ||
| - [FAQ](/postgres/faq) | ||
|
|
||
| ## Billing and limits | ||
|
|
||
| ### PostgreSQL version | ||
| Prisma Postgres uses usage-based pricing and includes spend controls. | ||
|
|
||
| Prisma Postgres is based **PostgreSQL v17**. | ||
| - [Pricing](https://www.prisma.io/pricing) | ||
| - [Operations-based billing explained](https://www.prisma.io/blog/operations-based-billing?utm_source=docs) | ||
| - [FAQ: estimating costs](/postgres/faq#is-there-a-sample-workload-to-estimate-my-expected-charges) | ||
|
|
||
| ### Architecture | ||
| In Prisma Console, you can track usage, set spend limits, and view billing details. | ||
|
|
||
|  | ||
|
|
||
| ## Technical details | ||
|
|
||
| Prisma Postgres uses a unique architecture to deliver unmatched efficiency, safety and ease of use. It is deployed on bare metal servers using unikernels (think: "hyper-specialized operating systems"). | ||
| Prisma Postgres is based on **PostgreSQL v17** and uses a unikernel-based architecture. | ||
|
|
||
| Learn more about the architecture in this article: [Prisma Postgres®: Building a Modern PostgreSQL Service Using Unikernels & MicroVMs](https://pris.ly/ppg-early-access?utm_source=docs). | ||
| Learn more: [Prisma Postgres: Building a modern PostgreSQL service](https://pris.ly/ppg-early-access?utm_source=docs). | ||
|
|
||
| :::info[Note] | ||
| Postgres, PostgreSQL and the Slonik Logo are trademarks or registered trademarks of the PostgreSQL Community Association of Canada, and used with their permission | ||
| Postgres, PostgreSQL, and the Slonik Logo are trademarks or registered trademarks of the PostgreSQL Community Association of Canada and are used with permission. | ||
| ::: | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.