Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Postgres 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

2. http://www.postgresql.org/docs/9.4/static/sql-notify.html


Also 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_tr...


LISTEN / NOTIFY is not recommended for production use. It will consume all of your connection pools gradually.


I can see how that could happen depending on how it is used, but I don't see how that must happen. Can you elaborate?


You 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.



This is another similarly stalled project: https://github.com/skariel/webalchemy


This project has not been updated in almost two years.


Has AMQP changed substantially in two years? For purposes of publishing a simple event?


Looking over the fork graph: https://github.com/omniti-labs/pg_amqp/network there are clearly people with that feel that status-quo release is missing features, etc.


I thought you could not do row-level triggers on views in Postgres: http://www.postgresql.org/docs/9.4/static/sql-createtrigger....




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: