1. https://www.postgresql.org/docs/9.6/static/sql-notify.html
1. https://www.postgresql.org/docs/9.6/static/sql-notify.html
https://gist.github.com/bithavoc/f40bbc33b553f2fddf9e1095858...
Something that RethinkDB supported natively :(
Having 100-1000x more active connections than you have cores on the box is worse than useless, it's actively detrimental.
-- LISTEN/NOTIFY has a payload size hardcoded maximum. For big documents, we have to send a record ID then fetch the document upon receiving a message. In practice, it adds 5ms of overhead.
-- One of the best features is that you can combine this with pg_try_advisory_lock to create job queues that use the core locking features of postgres, which are pretty darn reliable and well defined. We use nodejs, and if the server processing a job dies, the lock is released automatically and another nodejs process can pick it up.