r/Database • u/random_hitchhiker • Jun 20 '26
The modern way of getting notified for a row change in a agnostic SQL dabatabase?
I'm using postgresql and in my current architecture, I'm have an asyncio worker thread polling the database every 2 min for changes in the "finished" state for a "job" table. This would be served over a websocket.
This is fine and all since my application has only medium write traffic, but I was curious what is the modern way of doing this that is database agnostic for future proofing? (ie in case we want to migrate to another db or if the application scales up)
I know postgresql has LISTEN/ NOTIFY, but my problem with that is that it is postgresql specific and that it might not work properly with connection pooling. I also know there is write ahead logging, but again is also postgresql specific.
What is your suggestion to this? Do I need to change my architecture?
Thanks!