Tenant or user not found when connecting through the shared pooler
Last edited: 10/14/2026
Tenant or user not found 错误意味着共享池器无法将你的主机和用户名匹配到一个项目。有些驱动程序会把它报告为 FATAL: (ENOTFOUND) tenant/user postgres.<project-ref> not found。
这个错误看起来像是凭证问题,所以它经常会让人去重置一个其实从未出错的密码。原因几乎总是出在主机或用户名,而不是密码。
🌐 The error reads like a credentials problem, so it often sends people to reset a password that was never wrong. The cause is almost always the host or the username, not the password.
这个主机是手动输入的,而不是复制的 #
🌐 The host was typed instead of copied
共享的 pooler 主机看起来像 aws-1-us-east-2.pooler.supabase.com。这个数字是 pooler 集群的索引,不是区域名的一部分,而且一个区域可以有不止一个。aws-0 不是安全的默认值,而且你也无法根据区域推断主机。
🌐 Shared pooler hosts look like aws-1-us-east-2.pooler.supabase.com. The number is a pooler cluster index, not part of the region name, and a region can have more than one. aws-0 is not a safe default, and you can't work the host out from your region.
从 Connect 对话框中复制主机,而不是自己输入。
🌐 Copy the host from the Connect dialog rather than composing it.
用户名缺少项目引用 #
🌐 The username is missing the project ref
共享连接池连接使用 postgres.[PROJECT-REF],而不是 postgres。直接连接和专用连接池使用 postgres。
🌐 Shared pooler connections use postgres.[PROJECT-REF], not postgres. Direct connections and the dedicated pooler use postgres.
如果你通过共享池以自定义角色连接,用户名是 [ROLE].[PROJECT-REF]。只提供角色名而不提供项目引用,会产生这个错误,而不是认证失败。
🌐 If you connect as a custom role through the shared pooler, the username is [ROLE].[PROJECT-REF]. Supplying only the role name, with no project ref, produces this error rather than an authentication failure.
怎么修好它 #
🌐 How to fix it
- 在 Supabase 仪表板中打开 Connect 对话框。
- 选择 会话池 或 事务池。
- 复制整串,只替换密码占位符。
有关完整的主机、端口和用户名信息,请参见 连接到你的数据库。
🌐 For the full set of hosts, ports, and usernames, see Connect to your database.