© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•14mo ago•
2 replies
tom

Postgres User

I’m working on a project where I want to avoid using the Supabase master key for security reasons. Instead, I created a dedicated database user with limited permissions to manage specific operations, such as interacting with a subscription management table. My goal is to ensure secure access while adhering to the principle of least privilege.

Here’s what I’ve done so far:
1. Created a new database user with limited permissions.
2. Granted necessary privileges on specific tables and sequences for this user.
3. Verified the connection using a Postgres client (psql), and the connection works without issues. For example, I’m able to run queries like SELECT * FROM table_name WHERE id = 1 directly in psql.
4. Configured my backend (using Dart and Dart Frog) to connect to the database with this user’s credentials.

final connection = await Connection.open(Endpoint(
  host: 'aws-0-us-west-1.pooler.supabase.com',
  port: 5432,
  database: 'postgres',
  username: '<LIMITED_USER>',
  password: '<USER_PASSWORD>',
));
final connection = await Connection.open(Endpoint(
  host: 'aws-0-us-west-1.pooler.supabase.com',
  port: 5432,
  database: 'postgres',
  username: '<LIMITED_USER>',
  password: '<USER_PASSWORD>',
));


However, when I attempt to execute queries from my backend, I consistently encounter the following error:
Severity.fatal XX000: Tenant or user not found
Severity.fatal XX000: Tenant or user not found
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Postgres RLS user
SupabaseSSupabase / help-and-questions
4y ago
Default `USER postgres search_path`
SupabaseSSupabase / help-and-questions
4y ago
FATAL: 28P01: password authentication failed for user "postgres"
SupabaseSSupabase / help-and-questions
4mo ago
Ipv4 connection forces me to use postgres user?
SupabaseSSupabase / help-and-questions
7mo ago