# The GenServer is a cache, Postgres is the queue — why my agent queue survives deploys

**URL:** <https://forum.devtalk.com/t/the-genserver-is-a-cache-postgres-is-the-queue-why-my-agent-queue-survives-deploys/251580>\
**Category:** Blogs/Articles/Talks/Podcasts\
**Tags:** postgres, caching, elixir, otp, postgresql, blog-post\
**Created:** [10 November 2026 10:11 UTC](https://forum.devtalk.com/t/the-genserver-is-a-cache-postgres-is-the-queue-why-my-agent-queue-survives-deploys/251580 "2026-11-10T10:11:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![aicost\_tools](https://forum.devtalk.com/user_avatar/forum.devtalk.com/aicost_tools/32/8251_2.png) [@aicost\_tools](https://forum.devtalk.com/u/aicost_tools)\
**Post date:** [10 November 2026 10:17 UTC](https://forum.devtalk.com/t/the-genserver-is-a-cache-postgres-is-the-queue-why-my-agent-queue-survives-deploys/251580/2 "2026-11-10T10:17:44Z")

</div>

“If it must survive a restart, it is a row” is the line I’m stealing. The visibility point matters even more with agents than with normal jobs: a queued session that looks stuck tends to get re-dispatched by an impatient user, and then you pay for the same tokens twice. (Disclosure: I’m with aicost.tools, so double-billed agent runs are my pet peeve.) Do you dedupe dispatches on the Postgres side, e.g. one queued session per task, or did the UI fix make that unnecessary?

---

_[View the full topic](https://forum.devtalk.com/t/the-genserver-is-a-cache-postgres-is-the-queue-why-my-agent-queue-survives-deploys/251580)._
