I use Postgres SKIP LOCKED as a queue.

How-to initialize PostgreSQL in OS X?

Dump, backup and restore a PostgreSQL database

PostgreSQL commands