One Writer per LangGraph Graph: Non-Blocking Postgres Advisory Locks
· 6 min read
Take a session-level lock with pg_try_advisory_lock on a dedicated, unpooled connection, keyed by a stable hash of the graph name. The winner runs the tick; every other replica gets false at once and returns.
