Examples

View Source

Task-oriented guides. Each is also published as a page in the generated docs under Guides.

Start here:

  1. Getting started, the worker path: enqueue jobs, run a worker, tune the queue, enqueue inside your own transaction.
  2. Unique jobs, database-enforced deduplication with a temporal constraint.
  3. Workflows, DAG dependencies that actually block, resolved by a SQL/PGQ property graph.

Going further:

  1. pgmq, durable message streaming: batch delivery, topics, FIFO groups, and three ways to wake a consumer.
  2. Migration helpers, reuse Ergon's PostgreSQL patterns for your own tables, and register your migrations with Ergon's runner.
  3. Scheduling, recurring SQL with pg_cron, and why Ergon prefers cron ticks to row triggers.
  4. Operations, health checks, disaster recovery, derived-state drift, and boot-time partition safety.

Every example is runnable against the setup in the top-level README.