PostgreSQL 9.1.2
postgresql.org
postgresql.org
Regardless, you don't need a table lock to do it in any case. Doing so without such a lock is actually an example from the documentation:
http://www.postgresql.org/docs/current/static/plpgsql-contro...
In essence, you just do the UPDATE, and if you ge back no affected rows, you perform an INSERT. If the INSERT fails because the row already exists, you do the UPDATE again.
Anyway, off to see if I can find the newest and greatest version for Ubuntu.
I personally like how Hacker News and r/programming aggregates new changelogs of software I care about.
If it gets too bad, it shouldn't be too hard to add some code that would accelerate their trip off the front page.