enadzan's comments

enadzan | 7 months ago | on: Show HN: PgHook – Docker image that streams PostgreSQL row changes to webhooks

Yes, 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

enadzan | 4 years ago | on: Show HN: PgOutput2Json .NET lib for PostgreSQL change streaming to JSON

I was working on this for the past week. I needed a way to trigger background tasks when rows get inserted or updated in the DB, for an existing application that does not have insert/modification timestamps.

I used Npgsql that has replication support to implement it as a general-purpose library for dotnet-core.

I looked at wal2json decoding plugin to see how different types are handled. I could have used wal2json but I wanted to do it without the need to install anything extra to Postgres. Also, this way I have more control over JSON format.

page 1