Bonus: Answers to previous questions
- NOTIFY payload has a max length of 8000 bytes.
- Instead of concatenating the payload, I could use
row_to_json
. Which might be problematic given the 8000 bytes limit...
- We can use row-level locking with the new SKIP LOCKED option to implement a saner job queue using a table.