Hi Joel,
Thanks for sharing the patch.
I have a few questions based on a cursory first look.
> If a single listener is found, we signal only that backend.
> Otherwise, we fall back to the existing broadcast behavior.
The idea of not wanting to wake up all backends makes sense to me,
but I don’t understand why we want this optimization only for the case
where there is a single backend listening on a channel.
Is there a pattern of usage in LISTEN/NOTIFY where users typically
have either just one or several backends listening on a channel?
If we are doing this optimization, why not maintain a list of backends
for each channel, and only wake up those channels?
Thanks,
Rishu