NOTIFY and LISTEN appeals a lot but my understanding is LISTEN needs to be on the same connection, which isn’t realistic with connection pooling etc? Anyone got any experience with this feature?
Edit: In fact the second sentence in the documentation is "[...] NOTIFY channel is invoked, either by this session or another one connected to the same database, all the sessions currently listening on that notification channel are notified, and each will in turn notify its connected client application." [0]
One feature of PubSub that is also a caveat is that it is transactional. That is great for production code, but makes transactional tests impossible.
The best thing is that it can also track deletes and updates unlike simple polling of the database using select queries.