Disclosure: I work on MemorySync (I'm Mohammed, the founder). I drafted this page with AI assistance and checked it against the source issue and the official docs listed under Sources on Oct 28, 2026. I read the code and docs; I didn't run this FastAPI app for this page.
The question
In langchain-ai/langgraph#1292 , "Encountering OperationalError with Postgres Checkpointer in LangGraph" (Aug 9, 2024), the Postgres checkpointer failed with:
psycopg.OperationalError: the connection is closed
Enter fullscreen mode
Exit fullscreen mode
The graph was compiled inside a function like this:
async with AsyncPostgresSaver . from_conn_string ( os . environ . get ( " POSTGRES_CONN_STRING " )) as checkpointer : return workflow . compile ( checkpointer = checkpointer , interrupt_before = [ AgentRole .…