© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•13mo ago•
37 replies
Louis Deconinck

PGRST202 error with queues: public.pgmq_public.send not found in schema cache

I'm trying to use queues, but I keep getting this error:
{
  code: "PGRST202",
  details: "Searched for the function public.pgmq_public.send with parameters message, queue_name, sleep_seconds or with a single unnamed json/jsonb parameter, but no matches were found in the schema cache.",
  hint: null,
  message: "Could not find the function public.pgmq_public.send(message, queue_name, sleep_seconds) in the schema cache"
}
{
  code: "PGRST202",
  details: "Searched for the function public.pgmq_public.send with parameters message, queue_name, sleep_seconds or with a single unnamed json/jsonb parameter, but no matches were found in the schema cache.",
  hint: null,
  message: "Could not find the function public.pgmq_public.send(message, queue_name, sleep_seconds) in the schema cache"
}


This is some example code:
const { error } = await supabase
    .rpc('pgmq_public.send', {
        queue_name: 'scrape_skool_groups',
        message: { test: 'test' },
        sleep_seconds: 0
    });

if (error) {
    console.error(`Failed to enqueue group processing for ${groupName}:`, error);
}
const { error } = await supabase
    .rpc('pgmq_public.send', {
        queue_name: 'scrape_skool_groups',
        message: { test: 'test' },
        sleep_seconds: 0
    });

if (error) {
    console.error(`Failed to enqueue group processing for ${groupName}:`, error);
}

When running this SQL I get a hit back.
SELECT n.nspname, proname 
FROM pg_proc p 
JOIN pg_namespace n 
ON p.pronamespace = n.oid 
WHERE n.nspname = 'pgmq_public' AND proname = 'send';
SELECT n.nspname, proname 
FROM pg_proc p 
JOIN pg_namespace n 
ON p.pronamespace = n.oid 
WHERE n.nspname = 'pgmq_public' AND proname = 'send';


I have exposed the queue via postgress, have allowed all permissions to postgress adn service_role and I implemented the following RLS
alter policy "service_role_insert_queue"
on "pgmq"."q_scrape_skool_groups"
to public
with check (true);
alter policy "service_role_insert_queue"
on "pgmq"."q_scrape_skool_groups"
to public
with check (true);


Any idea as to how I could resolve this issue?
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

Supabase Queues (pgmq)
SupabaseSSupabase / help-and-questions
7mo ago
Could not find the function pgmq_public.send_batch(delay, msgs, queue_name) in the schema cache
SupabaseSSupabase / help-and-questions
2w ago
Exposing pgmq queues via migration with RLS
SupabaseSSupabase / help-and-questions
4mo ago
ERROR: schema "pgmq" does not exist (SQLSTATE 3F000)
SupabaseSSupabase / help-and-questions
6mo ago