Sequin allows developers to build on their API data using their Postgres database. They sync data from third-party APIs like Salesforce and HubSpot to Postgres, allowing users to select with SQL or an ORM. The post discusses various methods to capture changes in Postgres in real-time. One approach is to use Postgres’ Listen/Notify feature, which allows a session to listen to a channel for notifications. Another method is to poll the table directly, using an updated_at column as a cursor. Replication is another option, where Postgres sends the WAL stream over a network connection from the primary to a replica. Additionally, changes can be captured in an audit table, or foreign data wrappers (FDWs) can be used to read from and write to external data sources. The article concludes by stating that the best option depends on the specific use case.
https://blog.sequin.io/all-the-ways-to-capture-changes-in-postgres/