Skip to content

DOC: Langgraph checkpoint postgres setup is incomplete #4937

Description

Issue with current documentation:

I have recently started using the langgraph postgres checkpointer.

When reviewing the documentation, I've noticed the following:

> When manually creating Postgres connections and passing them to `PostgresSaver` or `AsyncPostgresSaver`, make sure to include `autocommit=True` and `row_factory=dict_row` (`from psycopg.rows import dict_row`). See a full example in this [how-to guide](https://langchain-ai.github.io/langgraph/how-tos/persistence_postgres/).

I understand why the autocommit=True parameter is currently requested from a pre-configured connection provided for the PostgresSaver class as it comes handy and avoid problems with the .setup() method not committing the checkpoint tables to the DB. However, row_factory=dict_row is also "necessary" according to the README, but there should be more detail into why this is necessary.
I've set up my current project with the default tuple_row() and it's working properly, but changing this would not be backwards-compatible right now. Hence, I'd need more justification to see why I'd need to switch to this setting. I think it would generally benefit other developers.

Idea or request for content:

Detail in the PostgresSaver class or elsewhere in the repo why do we need to use autocommit=True and row_factory=dict_row

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions