Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

docs: add troubleshooting guide for password auth failures after rotation (#50122)

Szymon Mentel4f10a55983c2
diff --git a/apps/docs/content/guides/database/connecting-to-postgres.mdx b/apps/docs/content/guides/database/connecting-to-postgres.mdx
index df6115b4621..30002d5662c 100644
--- a/apps/docs/content/guides/database/connecting-to-postgres.mdx
+++ b/apps/docs/content/guides/database/connecting-to-postgres.mdx
@@ -111,7 +111,7 @@ For convenience, you can also use the [Supabase client libraries](/docs/referenc
- [JavaScript](/docs/reference/javascript/introduction)
- [Flutter](/docs/reference/dart/introduction)
-- [Swift](/docs/reference/swift)
+- [Swift](/docs/reference/swift/introduction)
- [Python](/docs/reference/python/introduction)
- [C#](/docs/reference/csharp/introduction)
- [Kotlin](/docs/reference/kotlin/introduction)
diff --git a/apps/docs/content/troubleshooting/fatal-password-authentication-failed.mdx b/apps/docs/content/troubleshooting/fatal-password-authentication-failed.mdx
index 5dbb9e869d9..35c18554e39 100644
--- a/apps/docs/content/troubleshooting/fatal-password-authentication-failed.mdx
+++ b/apps/docs/content/troubleshooting/fatal-password-authentication-failed.mdx
@@ -24,8 +24,14 @@ Reserved characters in a password have to be [percent-encoded](https://en.wikipe
If you don't have the password, [reset it](/docs/guides/troubleshooting/how-do-i-reset-my-supabase-database-password-oTs5sB) in [Database settings](/dashboard/project/_/database/settings).
+## Rotated the password?
+
+If you're connecting through the shared pooler and this started right after resetting the role's password — with the username and password otherwise correct — see [Supavisor error: "password authentication failed" after rotating database password](/docs/guides/troubleshooting/supavisor-error-password-authentication-failed-after-password-rotation).
+
## Repeated failures cause a different error
Repeated authentication failures from the same address get that address banned. Once banned, connections stop failing with this error and start failing with [connection refused](/docs/guides/troubleshooting/error-connection-refused-when-trying-to-connect-to-supabase-database-hwG0Dr) instead.
If your error changes from authentication failed to connection refused while you're testing credentials, you're banned rather than locked out. That page has the unban procedure.
+
+This applies to direct connections and the dedicated pooler. The shared pooler has its own separate mechanism for repeated failures: instead of a banned IP, you'll see `FATAL: Circuit breaker open`. See [Supavisor error: "Circuit breaker open" after password rotation](/docs/guides/troubleshooting/supavisor-error-circuit-breaker-open-after-password-rotation-0fdb72).
diff --git a/apps/docs/content/troubleshooting/how-do-i-reset-my-supabase-database-password-oTs5sB.mdx b/apps/docs/content/troubleshooting/how-do-i-reset-my-supabase-database-password-oTs5sB.mdx
index e305d8b5427..3f5a572b90f 100644
--- a/apps/docs/content/troubleshooting/how-do-i-reset-my-supabase-database-password-oTs5sB.mdx
+++ b/apps/docs/content/troubleshooting/how-do-i-reset-my-supabase-database-password-oTs5sB.mdx
@@ -8,3 +8,5 @@ database_id = "6e4a515c-5e70-4b92-808c-f076d47d4e35"
---
You can reset your database password from the [**Database > Settings**](/dashboard/project/_/database/settings) section of the Dashboard.
+
+If connections through the [Shared Pooler (Supavisor)](/docs/guides/database/connecting-to-postgres) start failing right after you reset it — including for the built-in `postgres` role — this `28P01` error is expected, and retrying with the new password usually succeeds. See [Supavisor error: "password authentication failed" after rotating database password](/docs/guides/troubleshooting/supavisor-error-password-authentication-failed-after-password-rotation) for more detail.
diff --git a/apps/docs/content/troubleshooting/supavisor-error-circuit-breaker-open-after-password-rotation-0fdb72.mdx b/apps/docs/content/troubleshooting/supavisor-error-circuit-breaker-open-after-password-rotation-0fdb72.mdx
index 8516e7917db..f3120deee03 100644
--- a/apps/docs/content/troubleshooting/supavisor-error-circuit-breaker-open-after-password-rotation-0fdb72.mdx
+++ b/apps/docs/content/troubleshooting/supavisor-error-circuit-breaker-open-after-password-rotation-0fdb72.mdx
@@ -29,3 +29,7 @@ This typically happens when clients attempt to connect to the pooler (ports 5432
**Prevention:**
To avoid this IP lockout issue in the future, stop application instances before rotating the database password. Only restart your services once the new credentials have been successfully applied to your configuration.
+
+**See also:**
+
+- [Supavisor error: "password authentication failed" after rotating database password](/docs/guides/troubleshooting/supavisor-error-password-authentication-failed-after-password-rotation)
diff --git a/apps/docs/content/troubleshooting/supavisor-error-password-authentication-failed-after-password-rotation.mdx b/apps/docs/content/troubleshooting/supavisor-error-password-authentication-failed-after-password-rotation.mdx
new file mode 100644
index 00000000000..9daa3d2869d
--- /dev/null
+++ b/apps/docs/content/troubleshooting/supavisor-error-password-authentication-failed-after-password-rotation.mdx
@@ -0,0 +1,49 @@
+---
+title = "Supavisor error: \"password authentication failed\" after rotating database password"
+date_created = "2026-09-08T00:00:00+00:00"
+topics = [ "database", "supavisor" ]
+keywords = [ "password", "rotation", "28P01" ]
+
+[[errors]]
+code = "28P01"
+message = "password authentication failed for user \"...\""
+---
+
+If connections through the **Shared Pooler (Supavisor)** (`aws-[...].pooler.supabase.com`, port `5432` in session mode or `6543` in transaction mode) start failing with `password authentication failed for user "..."` shortly after you change your database password, even though the new password is correct, this is expected behavior, not a bug — it isn't something you need to treat as a problem unless it persists.
+
+<Admonition type="note">
+
+Ports `5432` and `6543` are also used by the direct connection and the Dedicated Pooler, but on a different host, `db.[project-id].supabase.co`. Those aren't affected by this.
+
+</Admonition>
+
+This applies to regular database roles authenticating with a username/password (including SCRAM, the default). It does not apply to JIT access-token connections, since those are validated live against the JIT provider on every connection rather than against a cached password.
+
+**Why Does This Happen?**
+
+- The connection pooler caches database credentials briefly for performance.
+- Right after a password change, the pooler may keep checking new connection attempts, which use the correct new password, against the old, cached credentials, and reject them as a result.
+
+**How to Resolve This:**
+
+<Admonition type="caution">
+
+These steps cover the pooler-side caching delay, which resolves on its own.
+
+Separately, if application instances keep connecting with the old password after changing an existing role's credential, those failed attempts can trip the [auth circuit breaker](/docs/guides/troubleshooting/supavisor-error-circuit-breaker-open-after-password-rotation-0fdb72), blocking connections from that client and disrupting the system further.
+
+To roll out a password change without downtime, create a new custom role with the new password alongside the existing one, migrate your clients over to it gradually, then retire the old role once every client has switched.
+
+</Admonition>
+
+1. First, confirm the new password is correct by connecting directly (bypassing the pooler), using a Postgres client such as `psql` with the new password. A successful direct connection supports the transient pooler-cache diagnosis. If the direct attempt fails, check whether the error is an authentication failure such as `28P01` before concluding that the password is wrong.
+2. If the direct connection works, retry through the pooler. A new connection attempt is generally what causes the pooler to pick up the new password. If your database already has active pooled connections, this also tends to happen automatically in the background within about 15 seconds; if the pool had gone idle before you rotated the password, nothing happens on its own — you need an actual reconnect attempt to trigger it.
+3. In rare cases, rate limiting or network delays can cause a few consecutive reconnect attempts in a row to fail before one succeeds.
+4. Avoid rotating the password multiple times in quick succession as each change restarts the same window and makes it harder to tell which attempt should be succeeding.
+5. If the direct connection works but pooler reconnects still fail after a few minutes, [contact support](/dashboard/support/new) and mention that the direct connection was verified working, so the transient-cache path can be ruled out.
+
+**See also:**
+
+- [FATAL: Password authentication failed](/docs/guides/troubleshooting/fatal-password-authentication-failed)
+- [Supavisor error: "Circuit breaker open" after password rotation](/docs/guides/troubleshooting/supavisor-error-circuit-breaker-open-after-password-rotation-0fdb72).
+- [Resetting a Supabase database password](/docs/guides/troubleshooting/how-do-i-reset-my-supabase-database-password-oTs5sB)