I have a written function that it's last row is:
Notify ALLOCWARE;
I know that this is a message via some sort of channel. Where I can find which function is triggered due to this command?
The list of channels on which a given session is listening is stored in the backend's private memory (listenChannels in src/backend/commands/async.c), so there is no way to figure out on which channels other sessions are listening.
pg_listening_channelsshows channels, that current_session listens to, while OP wants to list sessions that listen to his channel