© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•5mo ago•
21 replies
xobzoo

PostgREST Schema Cache issue – `PGRST002`

I've been having problems with the REST API of one project.

I know the DB is still happy, because actual SQL queries work just fine (both in the browser and DBeaver).

The REST part is failing, though. At least mostly.
-
https://{{server}}/auth/v1/…
https://{{server}}/auth/v1/…
works fine (sign in, sign out, current user info
…/auth/v1/user
…/auth/v1/user
)
-
https://{{server}}/rest/v1/…
https://{{server}}/rest/v1/…
returns
503 Service Unavailable
503 Service Unavailable


The full error response:
{
  "code": "PGRST002",
  "details": null,
  "hint": null,
  "message": "Could not query the database for the schema cache. Retrying."
}
{
  "code": "PGRST002",
  "details": null,
  "hint": null,
  "message": "Could not query the database for the schema cache. Retrying."
}


The PostgREST documentation says that error means
Could not connect with the database when building the Schema Cache due to the PostgreSQL service not running.

But SQL queries still work fine…. (probably “the PostgreSQL service” is not what I think it sounds like)
Schema_Cache_Issueweb_UI_displayed_error.png
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

Project-specific PostgREST schema cache stuck – PGRST002 errors
SupabaseSSupabase / help-and-questions
6mo ago
PostgREST schema cache stuck - existing tables return 404
SupabaseSSupabase / help-and-questions
4w ago
PostgREST cannot find chat tables in schema cache
SupabaseSSupabase / help-and-questions
4mo ago
Subject: PostgREST Schema Cache Not Updating After Configuration ChangesBody:
SupabaseSSupabase / help-and-questions
3mo ago