Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion apps/docs/content/_partials/database_setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ Your database will be available in less than a minute.
You can find your project credentials on the dashboard:

- [Database connection strings](https://supabase.com/dashboard/project/_/settings/api?showConnect=true): Direct and Pooler connection details including the connection string and parameters.
- [Database password](https://supabase.com/dashboard/project/_/settings/database): Reset database password here if you do not have it.
- [Database password](https://supabase.com/dashboard/project/_/database/settings): Reset database password here if you do not have it.
- [API credentials](https://supabase.com/dashboard/project/_/settings/api): your serverless API URL and `anon` / `service_role` keys.
2 changes: 1 addition & 1 deletion apps/docs/content/guides/ai/python-clients.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ For data science or ephemeral workloads, the [Supabase Vecs](https://supabase.gi

<Admonition type="tip">

You can get your connection string from the [**Database Settings**](https://supabase.com/dashboard/project/_/settings/database) page in your dashboard. Make sure to check **Use connection pooling**, then copy the URI. Also, change the URI scheme from `postgres` to `postgresql`. `vecs` uses SQLAlchemy under the hood, which only supports `postgresql` as a dialect.
You can get your connection string from the [**Database Settings**](https://supabase.com/dashboard/project/_/database/settings) page in your dashboard. Make sure to check **Use connection pooling**, then copy the URI. Also, change the URI scheme from `postgres` to `postgresql`. `vecs` uses SQLAlchemy under the hood, which only supports `postgresql` as a dialect.

</Admonition>

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/guides/ai/rag-with-permissions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ Since we're managing users and authentication outside of Supabase, we have two o

#### Direct Postgres connection

You can directly connect to your Supabase Postgres DB using the [connection info](/dashboard/project/_/settings/database) on your project's database settings page. To use RLS with this method, we use a custom session variable that contains the current user's ID:
You can directly connect to your Supabase Postgres DB using the [connection info](/dashboard/project/_/database/settings) on your project's Database Settings page. To use RLS with this method, we use a custom session variable that contains the current user's ID:

```sql
-- enable row level security
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/guides/database/beekeeper-studio.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ hideToc: true

<StepHikeCompact.Details title="Get your connection credentials">

Get your connection credentials from the [`Database Settings`](https://supabase.com/dashboard/project/_/settings/database). You will need:
Get your connection credentials from the [`Database Settings`](https://supabase.com/dashboard/project/_/database/settings). You will need:
- host
- username
- password
Expand All @@ -50,7 +50,7 @@ hideToc: true

<StepHikeCompact.Details title="Download your SSL Certificate">

Download your SSL certificate from the Dashboard's [`Database Settings`](https://supabase.com/dashboard/project/_/settings/database)
Download your SSL certificate from the Dashboard's [`Database Settings`](https://supabase.com/dashboard/project/_/database/settings)
![SSL](/docs/img/guides/database/connecting-to-postgres/beekeeper-studio/certificate.png)
</StepHikeCompact.Details>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Choose one of these Vercel Deploy Templates which use our [Vercel Deploy Integra

### Manual configuration

In your [`Database Settings`](https://supabase.com/dashboard/project/_/settings/database), make sure `Use connection pooler` is checked and `Transaction` mode is selected, then copy the URI and save it as the `POSTGRES_URL` environment variable. Remember to replace the password placeholder with your actual database password and add the following suffix `?workaround=supabase-pooler.vercel`.
In your [`Database Settings`](https://supabase.com/dashboard/project/_/database/settings), make sure `Use connection pooler` is checked and `Transaction` mode is selected, then copy the URI and save it as the `POSTGRES_URL` environment variable. Remember to replace the password placeholder with your actual database password and add the following suffix `?workaround=supabase-pooler.vercel`.

```txt .env.local
POSTGRES_URL="postgres://postgres.cfcxynqnhdybqtbhjemm:[YOUR-PASSWORD]@aws-0-ap-southeast-1.pooler.supabase.com:6543/postgres?workaround=supabase-pooler.vercel"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Every [Compute Add-On](/docs/guides/platform/compute-add-ons) has a pre-configur

### Configuring Supavisor's pool size

You can change how many database connections Supavisor can manage by altering the pool size in the "Connection pooling configuration" section of the [Database Settings](/dashboard/project/_/settings/database):
You can change how many database connections Supavisor can manage by altering the pool size in the "Connection pooling configuration" section of the [Database Settings](/dashboard/project/_/database/settings):

![Connection Info and Certificate.](/docs/img/database/pool-size.png)

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/guides/database/dbeaver.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ If you do not have DBeaver, you can download it from its [website](https://dbeav

<StepHikeCompact.Step step={5}>
<StepHikeCompact.Details title="Download certificate">
In the [Database Settings](https://supabase.com/dashboard/project/_/settings/database), download your SSL certificate.
In the [Database Settings](https://supabase.com/dashboard/project/_/database/settings), download your SSL certificate.
</StepHikeCompact.Details>

<StepHikeCompact.Code>
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/guides/database/drizzle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ If you plan on solely using Drizzle instead of the Supabase Data API (PostgREST)

Connect to your database using the Connection Pooler.

In your [`Database Settings`](https://supabase.com/dashboard/project/_/settings/database), make sure `Use connection pooler` is checked, then copy the URI and save it as the `DATABASE_URL` environment variable. Remember to replace the password placeholder with your actual database password.
In your [`Database Settings`](https://supabase.com/dashboard/project/_/database/settings), make sure `Use connection pooler` is checked, then copy the URI and save it as the `DATABASE_URL` environment variable. Remember to replace the password placeholder with your actual database password.

</StepHikeCompact.Details>

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/guides/database/import-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ By default, Supabase enforces query statement timeouts to ensure fair resource a

### 3. Estimate your required disk size

Large datasets consume disk space. Ensure your Supabase project has sufficient disk capacity to accommodate the imported data. If you know how big your database is going to be, you can manually increase the size in your [projects database settings](/dashboard/project/_/settings/database).
Large datasets consume disk space. Ensure your Supabase project has sufficient disk capacity to accommodate the imported data. If you know how big your database is going to be, you can manually increase the size in your [projects database settings](/dashboard/project/_/database/settings).

Read more about [disk management](/docs/guides/platform/database-size#disk-management).

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/guides/database/pgadmin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ hideToc: true

<StepHikeCompact.Details title="SSL">

Download your SSL certificate from Dashboard's [`Database Settings`](https://supabase.com/dashboard/project/_/settings/database).
Download your SSL certificate from Dashboard's [`Database Settings`](https://supabase.com/dashboard/project/_/database/settings).

In pgAdmin, navigate to the Parameters tab and select connection parameter as Root Certificate. Next navigate to the Root certificate input, it will open up a file-picker modal. Select the certificate you downloaded earlier and save the server details. pgAdmin should now be able to connect to your Postgres via SSL.

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/guides/database/postgres-js.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ hideToc: true

Create a `db.js` file with the connection details.

To get your connection details, go to your [`Database Settings`](https://supabase.com/dashboard/project/_/settings/database). Make sure `Use connection pooling` is enabled. Choose `Transaction Mode` if you're on a platform with transient connections, such as a serverless function, and `Session Mode` if you have a long-lived connection. Copy the URI and save it as the environment variable `DATABASE_URL`.
To get your connection details, go to your [`Database Settings`](https://supabase.com/dashboard/project/_/database/settings). Make sure `Use connection pooling` is enabled. Choose `Transaction Mode` if you're on a platform with transient connections, such as a serverless function, and `Session Mode` if you have a long-lived connection. Copy the URI and save it as the environment variable `DATABASE_URL`.

</StepHikeCompact.Details>

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/guides/database/postgres/roles.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ If you use special symbols in your Postgres password, you must remember to [perc

### Changing your project password

When you created your project you were also asked to enter a password. This is the password for the `postgres` role in your database. You can update this from the Dashboard under the [database settings](https://supabase.com/dashboard/project/_/settings/database) page. You should _never_ give this to third-party service unless you absolutely trust them. Instead, we recommend that you create a new user for every service that you want to give access too. This will also help you with debugging - you can see every query that each role is executing in your database within `pg_stat_statements`.
When you created your project you were also asked to enter a password. This is the password for the `postgres` role in your database. You can update this from the Dashboard under the [Database Settings](https://supabase.com/dashboard/project/_/database/settings) page. You should _never_ give this to third-party service unless you absolutely trust them. Instead, we recommend that you create a new user for every service that you want to give access too. This will also help you with debugging - you can see every query that each role is executing in your database within `pg_stat_statements`.

Changing the password does not result in any downtime. All connected services, such as PostgREST, PgBouncer, and other Supabase managed services, are automatically updated to use the latest password to ensure availability. However, if you have any external services connecting to the Supabase database using hardcoded username/password credentials, a manual update will be required.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ select pg_create_logical_replication_slot('example_slot', 'pgoutput');

<Admonition type="note">

This will need a **direct** connection (not a Connection Pooler) to your database and you can find the connection info in the [Dashboard](https://supabase.com/dashboard/project/_/settings/database).
This will need a **direct** connection (not a Connection Pooler) to your database and you can find the connection info in the [Dashboard](https://supabase.com/dashboard/project/_/database/settings).

You will also need to ensure that IPv6 is supported by your replication destination (or you can enable the [IPv4 add-on](/docs/guides/platform/ipv4-address))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Prisma is unable to allocate connections to pending queries fast enough to meet

- **Increase the pool timeout**: Increase the `pool_timeout` parameter in your Prisma configuration to give the pooler more time to allocate connections.
- **Reduce the connection limit**: If you've explicitly increased the `connection_limit` parameter in your Prisma configuration, try reducing it to a more reasonable value.
- **Increase pool size**: If you are connecting with Supavisor, try increasing the pool size in the [Database Settings](https://supabase.com/dashboard/project/_/settings/database).
- **Increase pool size**: If you are connecting with Supavisor, try increasing the pool size in the [Database Settings](https://supabase.com/dashboard/project/_/database/settings).
- **Optimize queries**: [Improve the efficiency of your queries](https://supabase.com/docs/guides/database/query-optimization) to reduce execution time.
- **Increase compute size**: Like the preceding option, this is a strategy to reduce query execution time.

Expand Down Expand Up @@ -118,14 +118,14 @@ Postgres or Supavisor rejected a request for more connections
### Possible causes:[#possible-causes-max-client-connections-reached]

- **When working in transaction mode (port 6543):** The error "Max client connections reached" occurs when clients try to form more connections with the pooler than it can support.
- **When working in session mode (port 5432):** The max amount of clients is restricted to the "Pool Size" value in the [Database Settings](https://supabase.com/dashboard/project/_/settings/database). If the "Pool Size" is set to 15, even if the pooler can handle 200 client connections, it will still be effectively capped at 15 for each unique ["database-role+database" combination](https://github.com/orgs/supabase/discussions/21566).
- **When working in session mode (port 5432):** The max amount of clients is restricted to the "Pool Size" value in the [Database Settings](https://supabase.com/dashboard/project/_/database/settings). If the "Pool Size" is set to 15, even if the pooler can handle 200 client connections, it will still be effectively capped at 15 for each unique ["database-role+database" combination](https://github.com/orgs/supabase/discussions/21566).
- **When working with direct connections**: Postgres is already servicing the max amount of connections

### Solutions [#solutions-causes-max-client-connections-reached]

- **Transaction Mode for serverless apps**: If you are using serverless functions (Supabase Edge, Vercel, AWS Lambda), switch to transaction mode (port 6543). It handles more connections than session mode or direct connections.
- **Reduce the number of Prisma connections**: A single client-server can establish multiple connections with a pooler. Typically, serverless setups do not need many connections. Starting with fewer, like five or three, or even just one, is often sufficient. In serverless setups, begin with `connection_limit=1`, increasing cautiously if needed to avoid maxing out connections.
- **Increase pool size**: If you are connecting with Supavisor, try increasing the pool size in the [Database Settings](https://supabase.com/dashboard/project/_/settings/database).
- **Increase pool size**: If you are connecting with Supavisor, try increasing the pool size in the [Database Settings](https://supabase.com/dashboard/project/_/database/settings).
- **Disconnect appropriately**: Close Prisma connections when they are no longer needed.
- **Decrease query time**: Reduce query complexity or add [strategic indexes](https://supabase.com/docs/guides/database/postgres/indexes) to your tables to speed up queries.
- **Increase compute size**: Sometimes the best option is to increase your compute size, which also increases your max client size and query execution speed
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/guides/database/psql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You can obtain your connection info and Server root certificate from your applic

Download your [SSL certificate](#connecting-with-ssl) to `/path/to/prod-supabase.cer`.

Find your connection settings. Go to your [`Database Settings`](https://supabase.com/dashboard/project/_/settings/database) and make sure `Use connection pooling` is checked. Change the connection mode to `Session`, and copy the parameters into the connection string:
Find your connection settings. Go to your [`Database Settings`](https://supabase.com/dashboard/project/_/database/settings) and make sure `Use connection pooling` is checked. Change the connection mode to `Session`, and copy the parameters into the connection string:

```shell
psql "sslmode=verify-full sslrootcert=/path/to/prod-supabase.cer host=[CLOUD_PROVIDER]-0-[REGION].pooler.supabase.com dbname=postgres user=postgres.[PROJECT_REF]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To check the error message, see the Supabase workflow run for your branch under

If you enable [network restrictions](/docs/guides/platform/network-restrictions) on your project, the branching cluster will be blocked from connecting to your project by default. This often results in database connection failures when migrating your production project after merging a development branch.

The workaround is to explicitly allow the IPv6 CIDR range of the branching cluster in your project's [database settings](https://supabase.com/dashboard/project/_/settings/database) page: `2600:1f18:2b7d:f600::/56`
The workaround is to explicitly allow the IPv6 CIDR range of the branching cluster in your project's [Database Settings](https://supabase.com/dashboard/project/_/database/settings) page: `2600:1f18:2b7d:f600::/56`

<Image
alt="Network restrictions to allow connections from branching cluster"
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/guides/functions/connect-to-postgres.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Deployed edge functions are pre-configured to use SSL for connections to the Sup

If you want to use SSL connections during local development, follow these steps:

1. Download the SSL certificate from [Database settings](https://supabase.com/dashboard/project/_/settings/database)
1. Download the SSL certificate from [Database Settings](https://supabase.com/dashboard/project/_/database/settings)
2. Add to your [local .env file](https://supabase.com/docs/guides/functions/secrets), add these two variables:

```bash
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/guides/functions/kysely-postgres.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Combining Kysely with Deno Postgres gives you a convenient developer experience

Find the example on [GitHub](https://github.com/supabase/supabase/tree/master/examples/edge-functions/supabase/functions/kysely-postgres)

Get your database connection credentials from your [Supabase Dashboard](https://supabase.com/dashboard/project/_/settings/database) and store them in an `.env` file:
Get your database connection credentials from your [Supabase Dashboard](https://supabase.com/dashboard/project/_/database/settings) and store them in an `.env` file:

```bash .env
DB_HOSTNAME=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ hideToc: true

When your project is up and running, navigate to your project dashboard and click on [Connect](https://supabase.com/dashboard/project/_?showConnect=true).

Look for the Session Pooler connection string and copy the string. You will need to replace the Password with your saved database password. You can reset your database password in your [database settings](https://supabase.com/dashboard/project/_/settings/database) if you do not have it.
Look for the Session Pooler connection string and copy the string. You will need to replace the Password with your saved database password. You can reset your database password in your [Database Settings](https://supabase.com/dashboard/project/_/database/settings) if you do not have it.

<Admonition type="note">

Expand Down
Loading
Loading