FATAL: Tenant or user not found

  • Supabase
  • Postgres

What it means

The Supabase connection pooler did not recognise the user in your connection string. The pooler needs the project's reference in the username, unlike a direct connection.

Why it happens

  • Username is postgres instead of postgres.<project-ref> on a pooler address.
  • The connection string mixes parts of the direct and pooled strings.
  • A typo in the project reference or region host.

How to fix it

  1. Copy the full pooler string from your Supabase project's connect settings rather than editing a direct one.
  2. Check the username is postgres.<project-ref> and the host matches your region.
  3. Update it in your host's environment variables and redeploy.

Let your AI find the cause

Paste this into Claude Code, Cursor, Lovable or whichever AI built your app. It looks first and changes nothing until you have read the answer.

My app fails with 'FATAL: Tenant or user not found'. Without changing anything yet, show me the connection strings this project uses (hide the passwords) and check each one's username, host and port against what a Supabase pooler expects.