/top/
/new/
/best/
/ask/
/show/
/job/
^
slacker news
login
about
←back to thread
Postgres LISTEN/NOTIFY does not scale
(www.recall.ai)
570 points
davidgu
| 2 comments |
07 Jul 25 14:05 UTC
|
HN request time: 0.41s
|
source
Show context
hombre_fatal
◴[
10 Jul 25 20:24 UTC
]
No.
44525152
[source]
▶
>>44490510 (OP)
#
Interesting. What if you just execute `NOTIFY` in its own connection outside of / after the transaction?
replies(4):
>>44525332
#
>>44525408
#
>>44526003
#
>>44528534
#
parthdesai
◴[
10 Jul 25 21:48 UTC
]
No.
44526003
[source]
▶
>>44525152
#
You lose transactional guarantees if you notify outside of the transaction though
replies(2):
>>44526146
#
>>44534706
#
hombre_fatal
◴[
10 Jul 25 22:02 UTC
]
No.
44526146
[source]
▶
>>44526003
#
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
◴[
10 Jul 25 22:35 UTC
]
No.
44526451
[source]
▶
>>44526146
#
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
◴[
11 Jul 25 01:18 UTC
]
No.
44527506
[source]
▶
>>44526451
#
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
#
ID:
GO
2.
cheesekunator
◴[
11 Jul 25 02:56 UTC
]
No.
44528017
[source]
▶
>>44527506 (TP)
#
98% of developers can't see it
↑