langgraph icon indicating copy to clipboard operation
langgraph copied to clipboard

Added postgresql sync and async checkpoint classes

Open sharan9678 opened this issue 10 months ago • 1 comments

I have added the postgresql sync and async checkpoints classes using psycopg3. To run the test we need to have a postgresql installed locally and then change the connection string in the both sync and async pregal test files.

sharan9678 avatar Mar 29 '24 15:03 sharan9678

@sharanrajt do we have any estimate on when this can be merged?

ajjjj8 avatar Apr 10 '24 20:04 ajjjj8

Hi @sharan9678 , to avoid extra maintenance burdens in the langgraph package, we don't plan to add any additional integrations in the main langgraph package that add dependencies

hinthornw avatar May 13 '24 18:05 hinthornw

I was reviewing the Langgraph documentation and came across this note:

While this class does support asynchronous checkpointing, it is not recommended for production workloads due to limitations in SQLite's write performance. For production workloads, consider using a more robust database like PostgreSQL.

I agree with this recommendation, but the documentation does not provide guidance on using other production-ready databases (SQL, MongoDB, Redis, etc.).

I will check @sharan9678's code for further insights.

ootkin avatar May 16 '24 20:05 ootkin

Hi @ootkin,

I had some similar requirements for PostgreSQL hence I wrote this code, But as of now langchain-ai provides support for PostgreSQL Checkpointer. Check the documentation at langchain-ai/langchain-postgres.

sharan9678 avatar May 17 '24 02:05 sharan9678

Could someone help on that? I need to build the checkpoint on postgresql, but lost here

flavioaltimari avatar May 19 '24 20:05 flavioaltimari

I have the same problem and I need to store checkpointers in a postgreSQL db. They also removed the checkpointer from the langchain-ai/langchain-postgres library.

FilippoFlorindiKAI avatar May 20 '24 10:05 FilippoFlorindiKAI