FATAL: Tenant or user not found
Last verified:
The fix
FATAL: Tenant or user not found. The shared pooler could not match this host and username to a project. Copy the Connect string. The user is postgres.[PROJECT-REF]. Do not invent the host, and do not reset the password for this sentence.
- 1
Copy the string from Connect
In the Supabase dashboard, open Connect. For a serverless app, including a Vercel function or a Prisma client on Vercel, choose the transaction pooler. For a long-running server that needs a session, choose the session pooler. Copy the whole URI. Replace only the password placeholder. Do not assemble
aws-0plus the region by hand.postgresql://postgres.[PROJECT-REF]:[PASSWORD]@[POOLER-HOST]:6543/postgres - 2
Keep the username with the project ref
On that copied host the user is
postgres.[PROJECT-REF]. The direct URL is a different shape, and its user ispostgreswith no ref. Puttingpostgres.[PROJECT-REF]ondb.[PROJECT-REF].supabase.co, or plainpostgreson the pooler host, is this error. Transaction mode is port6543. Session mode on the pooler is port5432. Those are not interchangeable with the direct port just because the number matches. - 3
Encode the password, and reset it only when the user is already right
Percent-encode reserved characters in the password.
@becomes%40, and#,?,&, and spaces have to be encoded too. A GUI field accepts them raw. A URI does not. If the host and the user were copied from Connect and the error changes toFATAL: password authentication failed, then reset the database password and update every environment that stored the old one. Resetting it while the error still says Tenant or user not found only breaks the places that had the right password. - 4
Give Prisma the pooler at runtime and the direct URL for migrations
Transaction mode does not support prepared statements. On the pooler URL Prisma uses at runtime, add
pgbouncer=true. PointdirectUrlat the direct connection, userpostgres, for migrations. Do not put this URL in aNEXT_PUBLIC_orVITE_variable. Once the tenant matches, a client created inside every serverless invocation is the next failure:sorry, too many clients already.DATABASE_URL="postgresql://postgres.[PROJECT-REF]:[PASSWORD]@[POOLER-HOST]:6543/postgres?pgbouncer=true" DIRECT_URL="postgresql://postgres:[PASSWORD]@db.[PROJECT-REF].supabase.co:5432/postgres"
Why it happens
Supabase's pooler troubleshooting names this Tenant or user not found. Some drivers print FATAL: (ENOTFOUND) tenant/user postgres. not found. Prisma and pg usually print FATAL: Tenant or user not found. It means the shared pooler (Supavisor) could not match the host plus the username to a project. It reads like a bad password. The password was often fine.
Shared pooler usernames are postgres.[PROJECT-REF], not postgres. A custom role is [ROLE].[PROJECT-REF]. The direct host db.[PROJECT-REF].supabase.co and the dedicated pooler use plain postgres. People hit this by editing a direct URL into a pooler URL and changing only the host and the port. The host is the other half. It looks like aws-1-us-east-2.pooler.supabase.com. The number is a cluster index, not part of the region, and a region can have more than one. aws-0 is not a default you can guess. The browser's anon key never goes through this URL. Invalid API key is the Data API. A missing sslmode is the certificate page. FATAL: password authentication failed is a later sentence, once the username really is valid.
The next error you'll probably hit
Once this is fixed, the usual follow-up is sorry, too many clients already. Postgres or the pooler refused another connection. On Vercel, each warm function was opening its own pool, and the database ran out.
Prompt to paste back into your AI tool
Paste this above the error.
Postgres connect failed with: FATAL: Tenant or user not found. If the driver worded it differently, paste that line. It may say FATAL: (ENOTFOUND) tenant/user postgres. not found. The host in DATABASE_URL is <host, with the password removed>. The username is <postgres or postgres.PROJECT-REF>. The port is <5432 or 6543>. Do not reset the database password while the error still says Tenant or user not found. Do not invent an aws-0 pooler host from the region. Do not put the database password in NEXT_PUBLIC_ or VITE_. Do not switch the browser client to the service role key. This is not an RLS error and not Invalid API key. 1. Tell me to open Connect, choose Transaction pooler or Session pooler, and copy the whole string. Replace only the password. 2. Say whether the username must be postgres.[PROJECT-REF] for this host. Plain postgres belongs on the direct host, not on the shared pooler. 3. Percent-encode reserved characters in the password. Do not print the password. 4. If this is Prisma, set DATABASE_URL to the transaction pooler with pgbouncer=true and directUrl to the direct connection. Show only those two lines with the password redacted.
Common questions
+I reset the database password and it still says FATAL: Tenant or user not found. Why?
The pooler never got as far as the password. The host was typed instead of copied, or the username is postgres without the project ref. Copy the Connect string for the session or transaction pooler. Reset the password only after the error changes to FATAL: password authentication failed.
+The direct URL works on my laptop and the pooler URL throws Tenant or user not found. Why?
They are different usernames. Direct is postgresql://postgres@db.[PROJECT-REF].supabase.co:5432. The shared pooler is postgresql://postgres.[PROJECT-REF]@ the host from Connect. Changing only the port to 6543 leaves the direct user on the pooler, and the pooler answers with this error.
+Is this the same as Invalid API key or new row violates row-level security policy?
No. Those come from the Data API, using the project URL and the anon or publishable key. FATAL: Tenant or user not found comes from a Postgres connection string. The anon key will not fix it, and disabling RLS will not either.
+The region is us-east-1. Can I use aws-0-us-east-1.pooler.supabase.com?
No. The number is a cluster index. A region can be on aws-1 or another cluster, and the docs say aws-0 is not a safe default. Copy the host from Connect. A guessed host is why the pooler reports that the tenant was not found.
Related errors
- sorry, too many clients alreadyPostgres or the pooler refused another connection. On Vercel, each warm function was opening its own pool, and the database ran out.Cursorv0BoltPostgresPrismaOct 27, 2026
- FATAL: password authentication failed for user "postgres"FATAL: password authentication failed for user "postgres". The database rejected this password (SQLSTATE 28P01). The database password is not your Supabase account password. Encode it in the URI, and update every host that stored the old one.CursorLovableBoltSupabasePostgresNov 6, 2026
- self-signed certificate in certificate chainself-signed certificate in certificate chain: the Postgres URL is missing TLS. On Vercel, use the pooled URL with sslmode=require. Leave TLS checks on.CursorLovableBoltPostgresPrismaOct 14, 2026
- Failed to fetch: Supabase project pausedFailed to fetch with Supabase status 540 means the project is paused. Restore it in the dashboard and wait. An empty URL is a different error.CursorLovableBoltSupabaseAuthOct 19, 2026
- @prisma/client did not initialize yet@prisma/client did not initialize yet. Run prisma generate so the client matches the schema. Generate does not migrate. Restart after it succeeds.CursorBoltReplitPrismaPostgresOct 14, 2026