zlacker

[parent] [thread] 1 comments
1. hosh+(OP)[view] [source] 2024-03-10 08:19:06
Notify can be triggered with stored procedures to send payloads related to changes to a table. It can be set up to send the id of a row that was inserted or updated, for example. (But WAL replication is usually better for this)
replies(1): >>yencab+XE
2. yencab+XE[view] [source] 2024-03-10 15:52:02
>>hosh+(OP)
Broadcasting the id to a lot of workers is not useful, only one of them should work on the task. Waking up the workers to do a SELECT FOR UPDATE .. SKIP LOCKED is the trick. At best the NOTIFY payload could include the kind of worker that should wake up.
[go to top]