langchain-ai/langgraph · error

ShallowPostgresSaver is deprecated as of version 2.0.20 and

Error message

ShallowPostgresSaver is deprecated as of version 2.0.20 and will be removed in 3.0.0. Use PostgresSaver instead, and invoke the graph with `graph.invoke(..., durability='exit')`.

What it means

Error "ShallowPostgresSaver is deprecated as of version 2.0.20 and will be removed in 3.0.0. Use PostgresSaver instead, and invoke the graph with `graph.invoke(..., durability='exit')`." thrown in langchain-ai/langgraph.

Source

Thrown at libs/checkpoint-postgres/langgraph/checkpoint/postgres/shallow.py:192

    supports most of the LangGraph persistence functionality with the exception of time travel.
    """

    SELECT_SQL = SELECT_SQL
    MIGRATIONS = MIGRATIONS
    UPSERT_CHECKPOINT_BLOBS_SQL = UPSERT_CHECKPOINT_BLOBS_SQL
    UPSERT_CHECKPOINTS_SQL = UPSERT_CHECKPOINTS_SQL
    UPSERT_CHECKPOINT_WRITES_SQL = UPSERT_CHECKPOINT_WRITES_SQL
    INSERT_CHECKPOINT_WRITES_SQL = INSERT_CHECKPOINT_WRITES_SQL

    lock: threading.Lock

    def __init__(
        self,
        conn: _internal.Conn,
        pipe: Pipeline | None = None,
        serde: SerializerProtocol | None = None,
    ) -> None:
        warnings.warn(
            "ShallowPostgresSaver is deprecated as of version 2.0.20 and will be removed in 3.0.0. "
            "Use PostgresSaver instead, and invoke the graph with `graph.invoke(..., durability='exit')`.",
            DeprecationWarning,
            stacklevel=2,
        )
        super().__init__(serde=serde)
        if isinstance(conn, ConnectionPool) and pipe is not None:
            raise ValueError(
                "Pipeline should be used only with a single Connection, not ConnectionPool."
            )

        self.conn = conn
        self.pipe = pipe
        self.lock = threading.Lock()
        self.supports_pipeline = Capabilities().has_pipeline()

    @classmethod
    @contextmanager

View on GitHub (pinned to 38031739e5)

When it happens

Trigger: Thrown at libs/checkpoint-postgres/langgraph/checkpoint/postgres/shallow.py:192 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of langchain-ai/langgraph@38031739e5 (2026-08-26). Data as JSON: /api/errors/d6c1038e1168927f. Report an issue: GitHub.