4 ms·
I wonder if it would be feasible to add this sort of real-time feed to a conventional RDBMS like PostgreSQL. This feature would be quite useful for at least one
by mwcampbell 12y ago
I wonder if it would be feasible to add this sort of real-time feed to a conventional RDBMS like PostgreSQL. This feature would be quite useful for at least one of my projects, but I'm not sure I want to give up a mature SQL-based DBMS for something relatively unproven like RethinkDB.
- coffeemug 12y agoYou could probably get a poor's man version of this by setting up materialized views, a trigger on those views, and then write code in the trigger that pushes updates onto a queueing system. It wouldn't be quite as convenient, but would probably accomplish what you want in many situations.
- kxo 12y agoThis exists: https://github.com/omniti-labs/pg_amqp https://github.com/omniti-labs/pg_amqp
- agrothberg 12y agoThis project has not been updated in almost two years.
- kxo 12y agoHas AMQP changed substantially in two years? For purposes of publishing a simple event?
- agrothberg 12y agoLooking over the fork graph: https://github.com/omniti-labs/pg_amqp/network https://github.com/omniti-labs/pg_amqp/network there are clearly people with that feel that status-quo release is missing features, etc.
- agrothberg 12y agoThis is another similarly stalled project: https://github.com/skariel/webalchemy https://github.com/skariel/webalchemy
- agrothberg 12y agoI thought you could not do row-level triggers on views in Postgres: http://www.postgresql.org/docs/9.4/static/sql-createtrigger.html http://www.postgresql.org/docs/9.4/static/sql-createtrigger....
- rpedela 12y agoPostgres supports LISTEN / NOTIFY [1,2], and you can stream a SELECT using COPY or a cursor. 1. http://www.postgresql.org/docs/9.4/static/sql-listen.html http://www.postgresql.org/docs/9.4/static/sql-listen.html 2. http://www.postgresql.org/docs/9.4/static/sql-notify.html http://www.postgresql.org/docs/9.4/static/sql-notify.html
- yummyfajitas 12y agoAlso a brief tutorial on how it works. See in particular the comment by Max Martinsson on how to do it in a replicated scenario. https://www.chrisstucchio.com/blog/2013/postgres_external_triggers.html https://www.chrisstucchio.com/blog/2013/postgres_external_tr...
- est 12y agoLISTEN / NOTIFY is not recommended for production use. It will consume all of your connection pools gradually.
- rpedela 12y agoI can see how that could happen depending on how it is used, but I don't see how that must happen. Can you elaborate?