2 ms·
There are a number of options. You can publish the WAL replication stream and write downstream services that react off of that. I wrote a library in Haskell [0]
by agentultra 5y ago
There are a number of options. You can publish the WAL replication stream and write downstream services that react off of that. I wrote a library in Haskell [0] that can read such a stream. Libraries exist in Python and other languages as well.
Or you can take advantage of the `LISTEN/NOTIFY` feature in Postgres and use an extension to push events out to various queues or webhooks [1].
[0] https://hackage.haskell.org/package/postgresql-replicant-0.1.0.1 https://hackage.haskell.org/package/postgresql-replicant-0.1...
[1] https://postgrest.org/en/v9.0/ecosystem.html#external-notification https://postgrest.org/en/v9.0/ecosystem.html#external-notifi...