Description
Checked other resources
- This is a bug, not a usage question. For questions, please use GitHub Discussions.
- I added a clear and detailed title that summarizes the issue.
- I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example).
- I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue.
Example Code
pip install -U langgraph-checkpoint-postgres
DB_URI ="" #Use an existing postgres checkpointer DB
from psycopg import Connection
from psycopg_pool import ConnectionPool
from psycopg.rows import dict_row
from langgraph.checkpoint.postgres import PostgresSaver
connection_kwargs ={
"autocommit": True,
"prepare_threshold": 0,
"row_factory": dict_row,
}
pool = ConnectionPool(
conninfo=DB_URI,
max_size=20,
kwargs=connection_kwargs
)
checkpointer = PostgresSaver(pool)
thread_id = "1"
config = {"configurable": {"thread_id": thread_id}}
checkpoint = checkpointer.get(config)
Error Message and Stack Trace (if applicable)
/usr/local/lib/python3.11/dist-packages/langgraph/checkpoint/base/__init__.py in get(self, config)
234 Optional[Checkpoint]: The requested checkpoint, or None if not found.
235 """
--> 236 if value := self.get_tuple(config):
237 return value.checkpoint
238
/usr/local/lib/python3.11/dist-packages/langgraph/checkpoint/postgres/__init__.py in get_tuple(self, config)
218
219 with self._cursor() as cur:
--> 220 cur.execute(
221 self.SELECT_SQL + where,
222 args,
/usr/local/lib/python3.11/dist-packages/psycopg/cursor.py in execute(self, query, params, prepare, binary)
95 )
96 except e._NO_TRACEBACK as ex:
---> 97 raise ex.with_traceback(None)
98 return self
99
UndefinedColumn: column cw.task_path does not exist
LINE 27: ...array_agg(array[cw.type::bytea, cw.blob] order by cw.task_pa...
Description
Faced the below issue with langgraph-checkpoint-postgres:
UndefinedColumn: column cw.task_path does not exist
LINE 27: ...array_agg(array[cw.type::bytea, cw.blob] order by cw.task_pa...
Tried moving to an older version of langgraph-checkpoint-postgres (version - 2.0.8) and it is working fine.
I.e. we are able to connect to the DB with langgraph-checkpoint-postgres == 2.0.8
This is an issue with a recent upgrade to the library.
We have code running in production and will become a major problem for us.
System Info
System Information
OS: Linux
OS Version: #1 SMP PREEMPT_DYNAMIC Thu Jun 27 21:05:47 UTC 2024
Python Version: 3.11.11 (main, Dec 4 2024, 08:55:07) [GCC 11.4.0]
Package Information
langchain_core: 0.3.37
langchain: 0.3.19
langchain_community: 0.3.18
langsmith: 0.3.8
langchain_cli: 0.0.35
langchain_openai: 0.3.6
langchain_text_splitters: 0.3.6
langgraph_sdk: 0.1.53
langserve: 0.3.1
Other Dependencies
aiohttp<4.0.0,>=3.8.3: Installed. No version info available.
async-timeout<5.0.0,>=4.0.0;: Installed. No version info available.
dataclasses-json<0.7,>=0.5.7: Installed. No version info available.
fastapi: 0.115.8
gitpython: 3.1.44
gritql: 0.1.5
httpx: 0.28.1
httpx-sse<1.0.0,>=0.4.0: Installed. No version info available.
jsonpatch<2.0,>=1.33: Installed. No version info available.
langchain-anthropic;: Installed. No version info available.
langchain-aws;: Installed. No version info available.
langchain-cohere;: Installed. No version info available.
langchain-community;: Installed. No version info available.
langchain-core<1.0.0,>=0.3.34: Installed. No version info available.
langchain-core<1.0.0,>=0.3.35: Installed. No version info available.
langchain-core<1.0.0,>=0.3.37: Installed. No version info available.
langchain-deepseek;: Installed. No version info available.
langchain-fireworks;: Installed. No version info available.
langchain-google-genai;: Installed. No version info available.
langchain-google-vertexai;: Installed. No version info available.
langchain-groq;: Installed. No version info available.
langchain-huggingface;: Installed. No version info available.
langchain-mistralai;: Installed. No version info available.
langchain-ollama;: Installed. No version info available.
langchain-openai;: Installed. No version info available.
langchain-text-splitters<1.0.0,>=0.3.6: Installed. No version info available.
langchain-together;: Installed. No version info available.
langchain-xai;: Installed. No version info available.
langchain<1.0.0,>=0.3.19: Installed. No version info available.
langserve[all]: Installed. No version info available.
langsmith-pyo3: Installed. No version info available.
langsmith<0.4,>=0.1.125: Installed. No version info available.
langsmith<0.4,>=0.1.17: Installed. No version info available.
numpy<2,>=1.26.4;: Installed. No version info available.
numpy<3,>=1.26.2;: Installed. No version info available.
openai<2.0.0,>=1.58.1: Installed. No version info available.
orjson: 3.10.15
packaging<25,>=23.2: Installed. No version info available.
pydantic: 2.10.6
pydantic-settings<3.0.0,>=2.4.0: Installed. No version info available.
pydantic<3.0.0,>=2.5.2;: Installed. No version info available.
pydantic<3.0.0,>=2.7.4: Installed. No version info available.
pydantic<3.0.0,>=2.7.4;: Installed. No version info available.
pytest: 8.3.4
PyYAML>=5.3: Installed. No version info available.
requests: 2.32.3
requests-toolbelt: 1.0.0
requests<3,>=2: Installed. No version info available.
rich: 13.9.4
SQLAlchemy<3,>=1.4: Installed. No version info available.
sse-starlette: 1.8.2
tenacity!=8.4.0,<10,>=8.1.0: Installed. No version info available.
tenacity!=8.4.0,<10.0.0,>=8.1.0: Installed. No version info available.
tiktoken<1,>=0.7: Installed. No version info available.
tomlkit: 0.13.2
typer[all]: Installed. No version info available.
typing-extensions>=4.7: Installed. No version info available.
uvicorn: 0.34.0
zstandard: 0.23.0
Activity