XX000 Tenant or user not found: Customer.io to Supabase fix
The Supabase pooler returns "XX000 - Tenant or user not found: query failed" when it can't match your login to a project. Set the username to postgres.{your-project-ref}, not plain postgres, and copy the pooler host and port from your project's connection settings. Test the string in psql first.
Sohail Hussain8 min readShort answer
- On Supabase's pooler the database user must be postgres.{your-project-ref}, not plain postgres. Without the project reference, the pooler cannot tell which project you mean.
- Copy the host, port and user from the Connect dialog in your Supabase dashboard instead of building them by hand, then test the string with psql before you re-enter it in Customer.io.
You set up a Customer.io data warehouse or database connection against Supabase's transaction pooler, and the login failed with this message:
XX000 - Tenant or user not found: query failed
This is a Supabase connection problem. It is not a Customer.io bug, and it is not an email deliverability problem. The same string shows up in any client that reaches the pooler with the wrong username or the wrong host.
Why it happens
XX000 is the PostgreSQL SQLSTATE for internal errors. It is a generic bucket, so the code itself tells you very little; the text after it is what matters. Supabase's pooler (Supavisor) serves many projects from a shared host, and it reads the project reference out of the username to route your connection. If the reference is missing, mistyped, or belongs to a project that is not on that host, it answers "Tenant or user not found."
Common causes, most frequent first:
- The username is plain
postgresinstead ofpostgres.{project-ref}. - The host was assembled by hand and has the wrong region or cluster prefix.
- The project reference belongs to another project (staging versus production is a classic mix-up).
- The project is paused, so there is nothing for the pooler to route to.
- A stray space or hidden character came along when the username was pasted.
A wrong password normally produces a different failure (password authentication failed). If you see the tenant error, fix the username, host and project reference before touching the password.
| Cause | Symptom | Fix |
|---|---|---|
Plain postgres user on the pooler | Tenant or user not found | Use postgres.{project-ref} |
| Hand-built pooler host | Same error, even with the right user | Copy the host from the dashboard |
| Reference from another project | Same error | Compare against your project URL |
| Paused project | Same error or connection failure | Restore the project in the dashboard |
| Wrong password | password authentication failed | Reset or re-enter the password |
Step-by-step fixes
Fix 1: use the pooler username format
Direct connections use postgres. Pooler connections add the project reference as a suffix.
| Setting | Direct connection | Pooler connection |
|---|---|---|
| Host | db.{project-ref}.supabase.co | the pooler host shown in your dashboard |
| Port | 5432 | 6543 (transaction mode) or 5432 (session mode) |
| User | postgres | postgres.{project-ref} |
| Database | postgres | postgres |
The project reference is the short string in your project URL. For https://abcdefghijklmnop.supabase.co, it is abcdefghijklmnop, so the username becomes:
postgres.abcdefghijklmnop
- Open the connection settings in Customer.io.
- Enter the whole value, including the dot, in the username field.
- If Customer.io shows separate fields, put the full dotted string in the user field only.
Fix 2: copy the host from the dashboard
The pooler hostname includes a region and a cluster prefix, and the prefix is not the same for every project. A host that works for one project can return this same error for another.
- Open your project in the Supabase dashboard.
- Click Connect and choose the transaction pooler option.
- Copy the host, port and user exactly as shown.
Dashboard labels change from time to time. If you don't see Connect, look for "Connection string" or "Database settings".
A complete string looks like this:
postgresql://postgres.{project-ref}:{your-password}@{pooler-host}:6543/postgres
Tip
Copy the whole connection string into a scratch file first, then split it into host, port, user and password. That way you never retype the project reference.
Fix 3: check the project reference
Compare the reference in the username with the one in your project URL, character by character. Also confirm the project is not paused in the dashboard; a paused project cannot accept pooler connections.
Fix 4: test the connection outside Customer.io
Before changing anything in Customer.io again, prove the string works from your own machine:
psql "postgresql://postgres.{project-ref}:{your-password}@{pooler-host}:6543/postgres" -c "select 1;"
If this returns a row, the credentials are right and the problem is how Customer.io received them. If it returns the same error, the username, host or project reference is still wrong.
If psql works but Customer.io still fails
Work through these in order:
- Re-type the username by hand rather than pasting it, in case a hidden character came along.
- Check the password for special characters. If the integration takes a connection URL rather than separate fields, characters such as
@,:,/and#must be percent-encoded. Separate fields usually don't need encoding. - Try session mode on the pooler (port 5432 with the same
postgres.{project-ref}user). Transaction mode doesn't support prepared statements, and some tools use them. That produces a different error, but it is the next thing you may hit once login works. - Consider the direct connection. It uses plain
postgresand thedb.host, so it avoids this error entirely. Direct connections have been IPv6-only by default on Supabase unless you add the IPv4 option, so a service that can only reach IPv4 hosts may fail to connect. That is a common reason people end up on the pooler. Check Supabase's current documentation for your project's setup.
Password handling
Never paste the database password into a support ticket or a chat. Send the host, port, username format and the exact error text instead.
Checklist before you try again
- The username is
postgres.{project-ref}, with the dot, and no trailing space. - The host was copied from the Connect dialog, not built by hand.
- The port matches the mode: 6543 for transaction, 5432 for session.
- The project reference matches the project you actually mean (staging or production).
- The project is active, not paused.
psqlwith the same values returns a row.
How to avoid it next time
- Store the full pooler string in your password manager the moment you copy it, with the project reference visible.
- Keep one connection note per environment, labeled staging or production.
- Create a dedicated database role for Customer.io with only the access it needs. On the pooler, that role's username also takes the suffix, for example
customerio.{project-ref}. - Reset the database password only when you must, and update every integration that uses it afterward.
People on Supabase's community forum report this same error from Customer.io setups, and the cause there was the missing project reference in the username.
If nothing works
If psql fails with the same error even with a host copied from the dashboard, the issue is on the Supabase side, so contact Supabase support. If psql succeeds but Customer.io rejects the same values, contact Customer.io support. Include the exact error text, the time of the attempt (with timezone), the host and port, the username format you used, and what you already tried. Leave the password out.
Subject: XX000 - Tenant or user not found: query failed (pooler login)
Hi, I'm connecting to my Supabase project through the transaction pooler
and get this error:
XX000 - Tenant or user not found: query failed
Time of attempt: {date, time, timezone}
Host: {pooler-host}
Port: 6543
Username format: postgres.{project-ref}
Project ref: {project-ref}
I already checked that the project is active and that the same values
connect from psql: {yes/no}. Can you confirm whether the pooler recognizes
this tenant, or how the integration should format the username?
Common questions
Is XX000 a Customer.io error or a Supabase error?
It comes from the Supabase pooler and is passed through by whatever client connects, so Customer.io is only displaying it.
Do I need the pooler at all?
Not if your service can reach the direct db. host, which uses plain postgres. The pooler is mainly useful when IPv6 direct access is a problem or when you need connection pooling.
Should I use port 6543 or 5432 on the pooler?
6543 is transaction mode and 5432 is session mode. Both need the postgres.{project-ref} username; pick session mode if your tool relies on prepared statements.
Does a wrong password cause this error?
Normally not; a wrong password gives password authentication failed. Check the username, host and project reference first.
Explore: Email Marketing Strategy
Related Articles
Customer.io to Supabase: cannot assign requested address fix
The error `dial tcp [IPv6 address]:5432: connect: cannot assign requested address: query failed` means Customer.io tried to reach Supabase's direct database host over IPv6 and its network couldn't. Enable Supabase's IPv4 add-on, or connect through the Supavisor pooler host, which accepts IPv4.
414 Request-URI Too Large in n8n's Amazon SES node: fix
The error 414 Request-URI Too Large in n8n's AWS SES node means a server in the path refused a request whose URL was too long, which a long HTML body can cause when it travels in the URL. Send through the SES v2 API with an HTTP Request node, or use SES SMTP.
Access denied, bad outbound sender: Outlook cold email fix
"Access denied, bad outbound sender" (550 5.1.8) means Microsoft 365 has put your mailbox on its restricted users list for spam-like sending. An admin must unblock it under Restricted entities in the Microsoft Defender portal. Then clean your list, lower your volume and resume gradually.
Acoustic Campaign "Application error" on login: bookmark fix
Acoustic Campaign shows "application error" at login when you open it from a bookmark saved while you were logged in, because the bookmark carries the old session. Log out, type your pod URL (campaign-us-[X].goacoustic.com) into the address bar, log in, then save a fresh bookmark.
Ready to supercharge your email marketing?
Start sending smarter emails with AI-powered campaigns. No credit card required.
Get Started Free