langgraph icon indicating copy to clipboard operation
langgraph copied to clipboard

feat: add asyncpg support for postgres checkpoint

Open Georgedyatmsk1405 opened this issue 1 month ago • 1 comments

Description: This PR adds support for asyncpg as an alternative database driver for Postgres checkpoints, providing users with choice between psycopg and asyncpg based on their performance needs and licensing preferences. The implementation maintains full backward compatibility with existing psycopg-based code while offering a new asyncpg implementation with identical API.

Key changes:

  • Added new AsyncPgPostgresSaver class using asyncpg in langgraph/checkpoint/postgres_asyncpg/
  • Added optional dependencies for asyncpg in pyproject.toml
  • Comprehensive test coverage for the new asyncpg implementation
  • All existing tests continue to pass with psycopg
  • No breaking changes to existing APIs
  • AsyncPgPostgresSaver works without installing psycopg

Issue: N/A (feature enhancement)

Dependencies:

  • Added asyncpg>=0.29.0 as optional dependency
  • All existing dependencies remain unchanged

Georgedyatmsk1405 avatar Nov 15 '25 18:11 Georgedyatmsk1405

Someone is attempting to deploy a commit to the LangChain Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Nov 15 '25 18:11 vercel[bot]