PostgreSQL Addhandler for CheckForNotifications

I’m currently trying to use PostgreSQL NOTIFY/LISTEN in a Web app.

I’m trying to add a Handler for CheckForNotifications but all I get is:

AddHandler pgDB.CheckForNotifications, AddressOf pgSQL_CheckForNotifications

Any fancy ideas? :slight_smile:

I was using the wrong method :slight_smile:

AddHandler pgDB.ReceivedNotification, AddressOf pgSQL_ReceivedNotification

All fixed and notifications works great.

If there’s any interest in what I’m using this for…

My web app has some global settings stored in App so all connected sessions can use them.
Any one of the connected sessions can update the values in this dictionary.

The “thing” here is that since my web app has 5 app instances behind HAProxy there are multiple “Apps” that has its own settings dictionary.
When any of the sessions alter the settings dictionary I needed a way to tell all other app instances to update the contents of the settings dictionary.

All apps is listening on a channel now and gets told when to go fetch the settings from the database :slight_smile:
Happy camper :slight_smile: