←back to thread

570 points davidgu | 2 comments | | HN request time: 0.41s | source
Show context
hombre_fatal ◴[] No.44525152[source]
Interesting. What if you just execute `NOTIFY` in its own connection outside of / after the transaction?
replies(4): >>44525332 #>>44525408 #>>44526003 #>>44528534 #
parthdesai ◴[] No.44526003[source]
You lose transactional guarantees if you notify outside of the transaction though
replies(2): >>44526146 #>>44534706 #
hombre_fatal ◴[] No.44526146[source]
Yeah, but pub/sub systems already need to be robust to missed messages. And, sending the notify after the transaction succeeds usually accomplishes everything you really care about (no false positives).
replies(1): >>44526451 #
parthdesai ◴[] No.44526451[source]
What happens when transaction succeeds but the execution of NOTIFY fails if it's outside of transaction, in it's own separate connection?
replies(2): >>44526695 #>>44527506 #
1. Groxx ◴[] No.44527506[source]
The same thing that happens if the notified process dies suddenly.

If you're not handling that, then whatever you're doing is unreliable either way.

replies(1): >>44528017 #
2. cheesekunator ◴[] No.44528017[source]
98% of developers can't see it