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
6 changes: 3 additions & 3 deletions apps/docs/content/guides/database/connecting-to-postgres.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ The connection string looks like this:
postgres://postgres.apbkobhfnmcqqzqeeqss:[YOUR-PASSWORD]@aws-0-[REGION].pooler.supabase.com:5432/postgres
```

Get your project's Session pooler connection string from your project dashboard by clicking [Connect](/dashboard/project/_?showConnect=true).
Get your project's Session pooler connection string from your project dashboard by clicking [Connect](/dashboard/project/_?showConnect=true&method=session).

### Supavisor transaction mode

Expand All @@ -111,15 +111,15 @@ The connection string looks like this:
postgres://postgres.apbkobhfnmcqqzqeeqss:[YOUR-PASSWORD]@aws-0-[REGION].pooler.supabase.com:6543/postgres
```

Get your project's Transaction pooler connection string from your project dashboard by clicking [Connect](/dashboard/project/_?showConnect=true).
Get your project's Transaction pooler connection string from your project dashboard by clicking [Connect](/dashboard/project/_?showConnect=true&method=transaction).

## Dedicated pooler

For paying customers, we provision a Dedicated Pooler ([PgBouncer](https://www.pgbouncer.org/)) that's co-located with your Postgres database. This will require you to connect with IPv6 or, if that's not an option, you can use the [IPv4 add-on](/docs/guides/platform/ipv4-address).

The Dedicated Pooler ensures best performance and latency, while using up more of your project's compute resources. If your network supports IPv6 or you have the IPv4 add-on, we encourage you to use the Dedicated Pooler over the Shared Pooler.

Get your project's Dedicated pooler connection string from your project dashboard by clicking [Connect](/dashboard/project/_?showConnect=true).
Get your project's Dedicated pooler connection string from your project dashboard by clicking [Connect](/dashboard/project/_?showConnect=true&method=transaction).

<Admonition type="note">

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`](/dashboard/project/_?showConnect=true) and copy the URI from the `Transaction pooler` section 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`](/dashboard/project/_?showConnect=true&method=transaction) and copy the URI from the `Transaction pooler` section 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
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 the [**Connect** panel](/dashboard/project/_?showConnect=true). Choose **Transaction pooler** if you're on a platform with transient connections, such as a serverless function, and **Session pooler** 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 the [**Connect** panel](/dashboard/project/_?showConnect=true). Choose [**Transaction pooler**](/dashboard/project/_?showConnect=true&method=transaction) if you're on a platform with transient connections, such as a serverless function, and [**Session pooler**](/dashboard/project/_?showConnect=true&method=session) 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/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 the project [**Connect** panel](/dashboard/project/_?showConnect=true) and copy the URL from the `Session pooler` section, and copy the parameters into the connection string:
Find your connection settings. Go to the project [**Connect** panel](/dashboard/project/_?showConnect=true&method=session) and copy the URL from the `Session pooler` section, 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 @@ -37,7 +37,7 @@ You will be using the [Supabase CLI](/docs/guides/cli) to initialise your local
<StepHikeCompact.Step step={2}>
<StepHikeCompact.Details title="Pull your database migration" fullWidth>

Pull your database changes using `supabase db pull`. To get your database connection string, go to your project dashboard, click [Connect](/dashboard/project/_?showConnect=true) and look for the Session pooler connection string.
Pull your database changes using `supabase db pull`. To get your database connection string, go to your project dashboard, click [Connect](/dashboard/project/_?showConnect=true&method=session) and look for the Session pooler connection string.

```markdown
supabase db pull --db-url <db_connection_string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ hideToc: true

Go to [database.new](https://database.new) and create a new Supabase project. Save your database password securely.

When your project is up and running, navigate to your project dashboard and click on [Connect](/dashboard/project/_?showConnect=true).
When your project is up and running, navigate to your project dashboard and click on [Connect](/dashboard/project/_?showConnect=true&method=session).

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](/dashboard/project/_/database/settings) if you do not have it.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ hideToc: true
<StepHikeCompact.Step step={2}>
<StepHikeCompact.Details title="Gather Database Connection Strings">

Open the project [**Connect** panel](/dashboard/project/_?showConnect=true). This quickstart connects using the **Transaction pooler** and **Session pooler** mode. Transaction mode is used for application queries and Session mode is used for running migrations with Prisma.
Open the project [**Connect** panel](/dashboard/project/_?showConnect=true). This quickstart connects using the [**Transaction pooler**](/dashboard/project/_?showConnect=true&method=transaction) and [**Session pooler**](/dashboard/project/_?showConnect=true&method=session) mode. Transaction mode is used for application queries and Session mode is used for running migrations with Prisma.

To do this, set the connection mode to `Transaction` in the [Database Settings page](/dashboard/project/_/database/settings) and copy the connection string and append `?pgbouncer=true&&connection_limit=1`. `pgbouncer=true` disables Prisma from generating prepared statements. This is required since our connection pooler does not support prepared statements in transaction mode yet. The `connection_limit=1` parameter is only required if you are using Prisma from a serverless environment. This is the Transaction mode connection string.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ hideToc: true

Go to [database.new](https://database.new) and create a new Supabase project. Save your database password securely.

When your project is up and running, navigate to your project dashboard and click on [Connect](/dashboard/project/_?showConnect=true).
When your project is up and running, navigate to your project dashboard and click on [Connect](/dashboard/project/_?showConnect=true&method=session).

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](/dashboard/project/_/database/settings) if you do not have it.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Supabase's core is Postgres, enabling the use of row-level security and providin
## Retrieve your Supabase host [#retrieve-supabase-host]

1. If you're new to Supabase, [create a project](https://database.new). Make a note of your password, you will need this later. If you forget it, you can [reset it here](/dashboard/project/_/database/settings).
1. On your project dashboard, click [Connect](/dashboard/project/_?showConnect=true)
1. On your project dashboard, click [Connect](/dashboard/project/_?showConnect=true&method=session)
1. Under the Session pooler, click on the View parameters under the connect string. Note your Host (`$SUPABASE_HOST`).

![Finding Supabase host address](/docs/img/guides/resources/migrating-to-supabase/amazon-rds/database-settings-host.png)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Supabase provides several [tools](https://github.com/supabase-community/firebase
}
```

1. On your project dashboard, click [Connect](/dashboard/project/_?showConnect=true)
1. On your project dashboard, click [Connect](/dashboard/project/_?showConnect=true&method=session)
1. Under the Session pooler, click on the View parameters under the connect string. Replace the `Host` and `User` fields with the values shown.
1. Enter the password you used when you created your Supabase project in the `password` entry in the `supabase-service.json` file.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The Firestore `collection` is "flattened" and converted to a table with basic co
}
```

1. On your project dashboard, click [Connect](/dashboard/project/_?showConnect=true)
1. On your project dashboard, click [Connect](/dashboard/project/_?showConnect=true&method=session)
1. Under the Session pooler, click on the View parameters under the connect string. Replace the `Host` and `User` fields with the values shown.
1. Enter the password you used when you created your Supabase project in the `password` entry in the `supabase-service.json` file.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Alternatively, use the [Heroku to Supabase migration tool](https://migrate.supab
## Retrieve your Supabase connection string [#retrieve-supabase-connection-string]

1. If you're new to Supabase, [create a project](/dashboard).
1. Get your project's Session pooler connection string from your project dashboard by clicking [Connect](/dashboard/project/_?showConnect=true).
1. Get your project's Session pooler connection string from your project dashboard by clicking [Connect](/dashboard/project/_?showConnect=true&method=session).
1. Replace [YOUR-PASSWORD] in the connection string with your database password. You can reset your database password on the [Database Settings page](/dashboard/project/_/database/settings) if you do not have it.

## Export your Heroku database to a file [#export-heroku-database]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Before you begin the migration, you need to collect essential information about
1. If you're new to Supabase, [create a project](/dashboard).
Make a note of your password, you will need this later. If you forget it, you can [reset it here](/dashboard/project/_/database/settings).

1. On your project dashboard, click [Connect](/dashboard/project/_?showConnect=true)
1. On your project dashboard, click [Connect](/dashboard/project/_?showConnect=true&method=session)
1. Under the Session pooler, click on the View parameters under the connect string. Note your Host (`$SUPABASE_HOST`).

![Finding Supabase host address](/docs/img/guides/resources/migrating-to-supabase/mssql/database-settings-host.png)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Before you begin the migration, you need to collect essential information about
1. If you're new to Supabase, [create a project](/dashboard).
Make a note of your password, you will need this later. If you forget it, you can [reset it here](/dashboard/project/_/database/settings).

1. On your project dashboard, click [Connect](/dashboard/project/_?showConnect=true)
1. On your project dashboard, click [Connect](/dashboard/project/_?showConnect=true&method=session)
1. Under the Session pooler, click on the View parameters under the connect string. Note your Host (`$SUPABASE_HOST`).

![Finding Supabase host address](/docs/img/guides/resources/migrating-to-supabase/mysql/database-settings-host.png)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export OLD_DB_URL="postgresql://neondb_owner:xxxxxxxxxxxxxxx-random-word-yyyyyyy
1. If you're new to Supabase, [create a project](/dashboard).
Make a note of your password, you will need this later. If you forget it, you can [reset it here](/dashboard/project/_/database/settings).

1. On your project dashboard, click [Connect](/dashboard/project/_?showConnect=true)
1. On your project dashboard, click [Connect](/dashboard/project/_?showConnect=true&method=session)
1. Under the Session pooler, click the **Copy** button to the right of your connection string to copy it to the clipboard.

## Set your `NEW_DB_URL` environment variable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Example:
1. If you're new to Supabase, [create a project](/dashboard).
Make a note of your password, you will need this later. If you forget it, you can [reset it here](/dashboard/project/_/database/settings).

1. On your project dashboard, click [Connect](/dashboard/project/_?showConnect=true)
1. On your project dashboard, click [Connect](/dashboard/project/_?showConnect=true&method=session)
1. Under Session pooler, Copy the connection string and replace the password placeholder with your database password.

<Admonition type="note">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export OLD_DB_URL="postgres://default:[email protected]
1. If you're new to Supabase, [create a project](/dashboard).
Make a note of your password, you will need this later. If you forget it, you can [reset it here](/dashboard/project/_/database/settings).

1. On your project dashboard, click [Connect](/dashboard/project/_?showConnect=true)
1. On your project dashboard, click [Connect](/dashboard/project/_?showConnect=true&method=session)
1. Under the Session pooler, click the **Copy** button to the right of your connection string to copy it to the clipboard.

## Set your `NEW_DB_URL` environment variable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ breadcrumb: 'Migrations'

<Admonition type="note">

Use the Session pooler connection string by default. If your ISP supports IPv6 or you have the IPv4 add-on enabled, use the direct connection string.
Use the [Session pooler](/dashboard/project/_?showConnect=true&method=session) connection string by default. If your ISP supports IPv6 or you have the IPv4 add-on enabled, use the direct connection string.

</Admonition>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Here are some things that are not stored directly in your database and will requ

<Admonition type="note">

Use the Session pooler connection string by default. If your ISP supports IPv6 or you have the IPv4 add-on enabled, use the direct connection string.
Use the [Session pooler](/dashboard/project/_?showConnect=true&method=session) connection string by default. If your ISP supports IPv6 or you have the IPv4 add-on enabled, use the direct connection string.

</Admonition>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ sudo apt-get update
sudo apt-get install postgresql-client
```

Once installed, you can find your PSQL string on the dashboard by clicking [connect](/dashboard/project/_?showConnect=true). Make sure if you are using the pooler connection that it is the Session pooler (port 5432).
Once installed, you can find your PSQL string on the dashboard by clicking [connect](/dashboard/project/_?showConnect=true). Make sure if you are using the pooler connection that it is the [Session pooler](/dashboard/project/_?showConnect=true&method=session) (port 5432).

<Admonition type="tip">

Expand Down
Loading
Loading