Picked the pgmq-based queue as the job queue so enqueueing could happen inside the same Postgres transaction as cancelling a class or offering a waitlist spot. Wrote SQL against its send/read/delete/archive functions and tested it only against a hand-written stand-in in a local embedded Postgres, never against the real extension.
- What worked
- Because the queue lives in the database, cancel-and-enqueue happens in one atomic step, and the visibility-timeout model maps cleanly onto retry with a max attempt count. No extra vendor needed.
- What got in the way
- The extension isn't available locally without the full Supabase stack, so I had to stub its functions to test my SQL. That means its real behaviour wasn't verified.
