3 ms·
Show HN: PgHook – Docker image that streams PostgreSQL row changes to webhooks
I needed real-time updates in a web UI whenever PostgreSQL table rows change, so I built PgHook. It's a 23 MB Docker image (10.1 MB compressed), .NET9 AOT-compiled, that streams logical replication events and sends them to a configurable webhook.
In my setup, the webhook converts events to SignalR messages that push updates to the UI.
I know about Debezium but I needed something minimal, and I like playing with csharp.
- tasn 1y agoCongrats on the launch! I'm biased, but you should probably consider changing the webhooks to follow https://www.standardwebhooks.com/ https://www.standardwebhooks.com/ for greater compatibility and library support.
- yyyyyn 1y agoHave you found a chance to look into the LISTEN/NOTIFY? You don't have to rely on logical replication slots, which may be a win.
- enadzan 1y agoYes, but (as far as I understand) LISTEN/NOTIFY would require adding triggers to the tables I need to track. Also, if the PgHook container is down, NOTIFY events would be lost — for UI updates that’s not critical, but it’s a limitation. I’ve been experimenting with logical replication [1] for a while, and it felt like a simpler fit here. [1] https://github.com/PgOutput2Json/PgOutput2Json https://github.com/PgOutput2Json/PgOutput2Json