1
Queues: add a pgmq_public.set_vt wrapper so Data API consumers can extend or delay a message
Source: supabase/supabase#54363 · opened by @martijn00
The pgmq_public wrappers that Studio installs when Queues are exposed through the Data API (getExposeQueuesSQL in packages/pg-meta/src/sql/studio/database/queues.ts) cover send, send_batch, read, pop, archive and delete. There is no wrapper for pgmq.set_vt, so a consumer that reads through PostgREST or supabase.schema('pgmq_public').rpc(...) cannot change a message's visibility timeout after it has read it. That rules out two common worker patterns: • Heartbeats for long jobs. A worker reads with sleep_seconds := 30, and the job takes longer. Without set_vt it cannot extend its lease, so the message becomes visible again and a second worker picks it up while the first is still running. The only choice is a long timeout up front, which delays the retry when a worker really dies. • Backoff after a failure. A worker that fails a message would normally push it back with set_vt(queue, msg_id, delay) to retry after 30 s, then 2 min, and so on. Without it, the me…
No pledges yet. Be the first to back this.
Comments
Similar requests
Queues: push delivery to an HTTP endpoint, signed per Standard Webhooks, with retries and a dead-letter queue
1 vote · 0 comments
Queues: update pgmq beyond 1.5.1 (FIFO groups, NOTIFY, topic routing)
1 vote · 0 comments
Programmatically enable supabase queues from config
18 votes · 0 comments
Add frequently-used advanced data type support in wrapper framework of FDW
1 vote · 0 comments
Queue detail page: allow sorting messages by date descending (newest first)
1 vote · 0 comments
No comments yet.