[PR #2475] Adding connection pool support to the PostgresStore #2731

Closed
opened 2026-02-20 17:47:28 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langchain-ai/langgraph/pull/2475

State: closed
Merged: Yes


🚧 🚧 🚧
I would like some guidance on how to update the tests here - the PostgresSaver does not use mocks and has a check for the type of connection. When I copied this code for the PostgresStore its causing test failures. Adding the mocks as accepted classes does not seem correct.


This PR is in reference to https://github.com/langchain-ai/langgraph/discussions/2457

I went ahead and coded an implementation for accepting ConnectionPool when creating a PostgresStore. I copied the PostgresSaver implementation for guideance.

One question I have - for the batch code it was trying to execute all cursors and then collect all the results after all cursors have been executed. In order to use the context management block I had to switch the implementation to execute each cursors sequentially. Is this an unacceptable implementation?

**Original Pull Request:** https://github.com/langchain-ai/langgraph/pull/2475 **State:** closed **Merged:** Yes --- 🚧 🚧 🚧 I would like some guidance on how to update the tests here - the PostgresSaver does not use mocks and has a check for the type of connection. When I copied this code for the PostgresStore its causing test failures. Adding the mocks as accepted classes does not seem correct. ----- This PR is in reference to https://github.com/langchain-ai/langgraph/discussions/2457 I went ahead and coded an implementation for accepting ConnectionPool when creating a PostgresStore. I copied the PostgresSaver implementation for guideance. One question I have - for the batch code it was trying to execute all cursors and then collect all the results after all cursors have been executed. In order to use the context management block I had to switch the implementation to execute each cursors sequentially. Is this an unacceptable implementation?
yindo added the pull-request label 2026-02-20 17:47:28 -05:00
yindo closed this issue 2026-02-20 17:47:28 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#2731