by keosak · 12y ago · 0 comments
With the psycopg2 module, you can use this mechanism together with select(), so your worker thread(s) don't have to poll at all. They even have an example in the documentation.
http://www.postgresql.org/docs/9.3/interactive/sql-notify.ht...
Just slides though. Haven't gotten around to writing a post about it yet.
Unfortunately if you're using JRuby you can't benefit from this, as the Postgres JDBC driver does polling.