Greenplum/MPP-optimized checkpoint saver for LangGraph (uses CTE-based list queries).
Project description
LangGraph Checkpoint Greenplum
Greenplum/MPP-optimized checkpoint savers for LangGraph. This package provides drop-in replacements for PostgresSaver and AsyncPostgresSaver that use a CTE-based list query instead of correlated subqueries, avoiding Broadcast Motion in Greenplum's MPP execution engine.
Why use this?
On Greenplum (and similar MPP databases), the default list query in langgraph-checkpoint-postgres uses correlated subqueries. The planner may broadcast the full inner tables to every segment, so list operations can be very slow on large datasets. The Greenplum savers use a CTE + JOIN pattern so the planner uses Redistribute Motion instead, often yielding orders-of-magnitude speedups for list() / alist().
Installation
Install the library and its dependency:
pip install langgraph-checkpoint-greenplum
This will pull in langgraph-checkpoint-postgres as well.
Usage
Use AsyncGreenplumSaver or GreenplumSaver exactly like the Postgres savers. Call .setup() the first time to create tables.
Async
from langgraph.checkpoint.greenplum import AsyncGreenplumSaver
DB_URI = "postgres://user:pass@host:5432/dbname"
async with AsyncGreenplumSaver.from_conn_string(DB_URI) as checkpointer:
await checkpointer.setup()
# use as a drop-in replacement for AsyncPostgresSaver
Sync
from langgraph.checkpoint.greenplum import GreenplumSaver
DB_URI = "postgres://user:pass@host:5432/dbname"
with GreenplumSaver.from_conn_string(DB_URI) as checkpointer:
checkpointer.setup()
# use as a drop-in replacement for PostgresSaver
Requirements
- Greenplum 6+ (or PostgreSQL 9.3+) for the CTE query (uses
CROSS JOIN LATERAL). langgraph-checkpoint-postgres(and thuspsycopgandlanggraph-checkpoint) are installed automatically.
Release to PyPI (GitHub Actions)
This repository includes a publish workflow at .github/workflows/publish-pypi.yml.
One-time setup
- In PyPI, configure a Trusted Publisher for this project:
- Owner:
StarJourneyMingsing - Repository:
langgraph-checkpoint-greenplum - Workflow name:
publish-pypi.yml - Environment name:
pypi
- Owner:
- In GitHub, create environment
pypiin repository settings (optional protection rules can be added).
Publish a new version
- Update
versioninpyproject.toml. - Commit and push changes.
- Create and push a version tag:
git tag v0.1.1
git push origin v0.1.1
The workflow will verify that tag version matches pyproject.toml, build distributions, and publish to PyPI.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langgraph_checkpoint_greenplum-0.1.3.tar.gz.
File metadata
- Download URL: langgraph_checkpoint_greenplum-0.1.3.tar.gz
- Upload date:
- Size: 96.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d74a765cf8960bd69b267f330fcf23d9d91aae7bc784cc2e171e02550a82bf4
|
|
| MD5 |
708d765d4438a91cf9c602e8e3ada9fa
|
|
| BLAKE2b-256 |
1dbb81672f4262710b0d085c19f2579bb90ce0e5d2f1322f8bc84c8f425fd2f5
|
Provenance
The following attestation bundles were made for langgraph_checkpoint_greenplum-0.1.3.tar.gz:
Publisher:
publish-pypi.yml on StarJourneyMingsing/langgraph-checkpoint-greenplum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langgraph_checkpoint_greenplum-0.1.3.tar.gz -
Subject digest:
7d74a765cf8960bd69b267f330fcf23d9d91aae7bc784cc2e171e02550a82bf4 - Sigstore transparency entry: 1008097115
- Sigstore integration time:
-
Permalink:
StarJourneyMingsing/langgraph-checkpoint-greenplum@6b28e237b9947638a73c5c68a1302b30e166f8ba -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/StarJourneyMingsing
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@6b28e237b9947638a73c5c68a1302b30e166f8ba -
Trigger Event:
push
-
Statement type:
File details
Details for the file langgraph_checkpoint_greenplum-0.1.3-py3-none-any.whl.
File metadata
- Download URL: langgraph_checkpoint_greenplum-0.1.3-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44991af88886ae3238c971ad1ae26e84f8fccc928638fb646583e685b844a2d0
|
|
| MD5 |
74c765004ba3ad2769e96f7fbbd24365
|
|
| BLAKE2b-256 |
71064be5c5cd0bb3c9324a608604a2a0139acd451b40ec49610e75fd5ff0ed1d
|
Provenance
The following attestation bundles were made for langgraph_checkpoint_greenplum-0.1.3-py3-none-any.whl:
Publisher:
publish-pypi.yml on StarJourneyMingsing/langgraph-checkpoint-greenplum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langgraph_checkpoint_greenplum-0.1.3-py3-none-any.whl -
Subject digest:
44991af88886ae3238c971ad1ae26e84f8fccc928638fb646583e685b844a2d0 - Sigstore transparency entry: 1008097170
- Sigstore integration time:
-
Permalink:
StarJourneyMingsing/langgraph-checkpoint-greenplum@6b28e237b9947638a73c5c68a1302b30e166f8ba -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/StarJourneyMingsing
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@6b28e237b9947638a73c5c68a1302b30e166f8ba -
Trigger Event:
push
-
Statement type: