supa_queue
mansueli-supa_queue · Simple PostgreSQL job queue that dispatches asynchronous HTTP requests with pg_net, schedules processing and retries with pg_cron, and stores endpoint credentials in Supabase Vault.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101171 | supa_queue | mansueli-supa_queue | 1.0.4 | FEAT | Apache-2.0 | SQL |
PostgreSQL · 10, 11, 12, 13, 14, 15, 16, 17, 18
| Relationships | |
|---|---|
| Requires | pg_cron pg_net plpgsql supabase_vault |
Usage
Sources:
supa_queue version 1.0.4 is a Supabase-oriented SQL queue built on pg_net and pg_cron. Inserts into job_queue trigger asynchronous GET, POST, or DELETE requests; tables track in-flight jobs and workers, while scheduled functions collect responses and retry failures. The consumer URL and service-role key are read from Vault secrets.
Example
After reviewing the installation SQL, configuring Vault, and creating the required extensions:
Installation immediately creates cron jobs, and one scheduled function sleeps twice for 20 seconds. Several functions are SECURITY DEFINER, two are forced into public, and request_wrapper(...) can issue arbitrary HTTP requests unless execution is revoked. Tables have RLS enabled but no policies. Before installation, fix ownership/search paths and schema placement, revoke public execution, add grants/policies, constrain destinations, protect Vault access, and define retry/idempotency and retention behavior.