AsyncPostgresStore exception: psycopg.errors.DataException: expected 1536 dimensions, not 768 #1117

Closed
opened 2026-02-20 17:43:09 -05:00 by yindo · 5 comments
Owner

Originally created by @khteh on GitHub (Jan 14, 2026).

Checked other resources

  • This is a bug, not a usage question. For questions, please use the LangChain Forum (https://forum.langchain.com/).
  • 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

async def PostgreSQLStoreSetup(pool: AsyncConnectionPool) -> AsyncPostgresStore:
    # Set up the checkpointer (uncomment this line the first time you run the app)
    # Check if the checkpoints table exists
    store = AsyncPostgresStore(pool, index={
                "embed": OllamaEmbeddings(model=appconfig.EMBEDDING_MODEL, base_url=appconfig.BASE_URI, num_ctx=8192, num_gpu=1, temperature=0),
                "dims": appconfig.EMBEDDING_DIMENSIONS,
            }
    )
    async with pool.connection() as conn:
        async with conn.cursor() as cur:
            try:
                await cur.execute("""
                    SELECT EXISTS (
                        SELECT FROM information_schema.tables 
                        WHERE  table_schema = 'public'
                        AND    table_name   = 'store'
                    );
                """)
                table_exists = (await cur.fetchone())[0]
                if not table_exists:
                    logging.info("Store table does not exist. Running setup...")
                    await store.setup()  # Run migrations. Done once
                else:
                    logging.info("Store table already exists. Skipping setup.")
            except Error as e:
                logging.exception(f"Error checking for store table: {e}")
                # Optionally, you might want to raise this error
                raise e
    return store

Error Message and Stack Trace (if applicable)

> Finished chain.
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/Python/rag-agent/src/rag_agent/RAGAgent.py", line 251, in <module>
    asyncio.run(main())
    ~~~~~~~~~~~^^^^^^^^
  File "/usr/lib/python3.13/asyncio/runners.py", line 195, in run
    return runner.run(main)
           ~~~~~~~~~~^^^^^^
  File "/usr/lib/python3.13/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/usr/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
  File "/usr/src/Python/rag-agent/src/rag_agent/RAGAgent.py", line 248, in main
    await rag.ChatAgent(config, input_message)
  File "/usr/src/Python/rag-agent/src/rag_agent/RAGAgent.py", line 190, in ChatAgent
    async for step in self._agent.astream(
    ...<5 lines>...
        step["messages"][-1].pretty_print()
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/pregel/main.py", line 2974, in astream
    async for _ in runner.atick(
    ...<13 lines>...
            yield o
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/pregel/_runner.py", line 304, in atick
    await arun_with_retry(
    ...<15 lines>...
    )
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/pregel/_retry.py", line 138, in arun_with_retry
    return await task.proc.ainvoke(task.input, config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/_internal/_runnable.py", line 705, in ainvoke
    input = await asyncio.create_task(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
        step.ainvoke(input, config, **kwargs), context=context
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/_internal/_runnable.py", line 473, in ainvoke
    ret = await self.afunc(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 845, in _afunc
    outputs = await asyncio.gather(*coros)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 1199, in _arun_one
    content = _handle_tool_error(e, flag=self._handle_tool_errors)
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 429, in _handle_tool_error
    content = flag(e)  # type: ignore [assignment, call-arg]
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 386, in _default_handle_tool_errors
    raise e
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 1190, in _arun_one
    return await self._awrap_tool_call(tool_request, execute)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/deepagents/middleware/filesystem.py", line 1143, in awrap_tool_call
    tool_result = await handler(request)
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 1181, in execute
    return await self._execute_tool_async(req, input_type, config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 1125, in _execute_tool_async
    content = _handle_tool_error(e, flag=self._handle_tool_errors)
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 429, in _handle_tool_error
    content = flag(e)  # type: ignore [assignment, call-arg]
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 386, in _default_handle_tool_errors
    raise e
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 1082, in _execute_tool_async
    response = await tool.ainvoke(call_args, config)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/structured.py", line 67, in ainvoke
    return await super().ainvoke(input, config, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/base.py", line 642, in ainvoke
    return await self.arun(tool_input, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/base.py", line 1117, in arun
    raise error_to_raise
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/base.py", line 1083, in arun
    response = await coro_with_context(coro, context)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/structured.py", line 121, in _arun
    return await self.coroutine(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/deepagents/middleware/subagents.py", line 370, in atask
    result = await subagent.ainvoke(subagent_state, runtime.config)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/pregel/main.py", line 3161, in ainvoke
    async for chunk in self.astream(
    ...<29 lines>...
            chunks.append(chunk)
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/pregel/main.py", line 2974, in astream
    async for _ in runner.atick(
    ...<13 lines>...
            yield o
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/pregel/_runner.py", line 304, in atick
    await arun_with_retry(
    ...<15 lines>...
    )
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/pregel/_retry.py", line 138, in arun_with_retry
    return await task.proc.ainvoke(task.input, config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/_internal/_runnable.py", line 705, in ainvoke
    input = await asyncio.create_task(
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
        step.ainvoke(input, config, **kwargs), context=context
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/_internal/_runnable.py", line 473, in ainvoke
    ret = await self.afunc(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 845, in _afunc
    outputs = await asyncio.gather(*coros)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 1176, in _arun_one
    return await self._execute_tool_async(tool_request, input_type, config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 1125, in _execute_tool_async
    content = _handle_tool_error(e, flag=self._handle_tool_errors)
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 429, in _handle_tool_error
    content = flag(e)  # type: ignore [assignment, call-arg]
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 386, in _default_handle_tool_errors
    raise e
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 1082, in _execute_tool_async
    response = await tool.ainvoke(call_args, config)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/structured.py", line 67, in ainvoke
    return await super().ainvoke(input, config, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/base.py", line 642, in ainvoke
    return await self.arun(tool_input, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/base.py", line 1117, in arun
    raise error_to_raise
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/base.py", line 1083, in arun
    response = await coro_with_context(coro, context)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/structured.py", line 121, in _arun
    return await self.coroutine(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/src/rag_agent/Tools.py", line 122, in upsert_memory
    await store.aput(
    ...<3 lines>...
    )
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/store/base/batch.py", line 151, in aput
    return await fut
           ^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/store/base/batch.py", line 347, in _run
    results = await s.abatch(dedupped)
              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/store/postgres/aio.py", line 172, in abatch
    await self._execute_batch(grouped_ops, results, conn)
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/store/postgres/aio.py", line 415, in _execute_batch
    async with self._cursor(pipeline=True) as cur:
               ~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/contextlib.py", line 221, in __aexit__
    await anext(self.gen)
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/store/postgres/aio.py", line 570, in _cursor
    conn.pipeline(),
    ~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/contextlib.py", line 221, in __aexit__
    await anext(self.gen)
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/psycopg/connection_async.py", line 481, in pipeline
    async with pipeline:
               ^^^^^^^^
  File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/psycopg/_pipeline_async.py", line 75, in __aexit__
    raise exc2.with_traceback(None)
psycopg.errors.DataException: expected 1536 dimensions, not 768
During task with name 'tools' and id 'b5e3ebcd-8775-cf78-ed5a-473a4cd4b320'
During task with name 'tools' and id '11fb09d0-fb7a-094e-4e5a-b346c5f942fb'

Description

Error inserting memory into PostgreSQL store. Why is there a mismatch in the dims? I tried changing the dims to 768, remove store and store_migrations tables in the DB and call .setup() but to no avail!

System Info

System Information
------------------
> OS:  Linux
> OS Version:  #8-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 21:44:46 UTC 2025
> Python Version:  3.13.7 (main, Jan  8 2026, 12:15:45) [GCC 15.2.0]

Package Information
-------------------
> langchain_core: 1.2.7
> langchain: 1.2.3
> langchain_community: 0.4.1
> langsmith: 0.6.2
> langchain_anthropic: 1.3.1
> langchain_classic: 1.0.1
> langchain_google_genai: 4.1.3
> langchain_neo4j: 0.7.0
> langchain_ollama: 1.0.1
> langchain_postgres: 0.0.16
> langchain_text_splitters: 1.1.0
> langgraph_api: 0.6.34
> langgraph_cli: 0.4.11
> langgraph_runtime_inmem: 0.22.0
> langgraph_sdk: 0.3.3

Optional packages not installed
-------------------------------
> langserve

Other Dependencies
------------------
> aiohttp: 3.13.3
> anthropic: 0.75.0
> asyncpg: 0.31.0
> blockbuster: 1.5.26
> click: 8.3.1
> cloudpickle: 3.1.2
> cryptography: 46.0.3
> dataclasses-json: 0.6.7
> filetype: 1.2.0
> google-genai: 1.57.0
> grpcio: 1.76.0
> grpcio-health-checking: 1.76.0
> grpcio-tools: 1.75.1
> httpx: 0.28.1
> httpx-sse: 0.4.3
> jsonpatch: 1.33
> jsonschema-rs: 0.29.1
> langgraph: 1.0.6
> langgraph-checkpoint: 4.0.0
> neo4j: 6.1.0
> neo4j-graphrag: 1.12.0
> numpy: 2.4.1
> ollama: 0.6.1
> opentelemetry-api: 1.39.1
> opentelemetry-exporter-otlp-proto-http: 1.39.1
> opentelemetry-sdk: 1.39.1
> orjson: 3.11.5
> packaging: 25.0
> pgvector: 0.3.6
> protobuf: 6.33.4
> psycopg: 3.3.2
> psycopg-pool: 3.3.0
> pydantic: 2.12.5
> pydantic-settings: 2.12.0
> pyjwt: 2.10.1
> pytest: 9.0.2
> python-dotenv: 1.2.1
> pyyaml: 6.0.3
> PyYAML: 6.0.3
> requests: 2.32.5
> requests-toolbelt: 1.0.0
> sqlalchemy: 2.0.45
> SQLAlchemy: 2.0.45
> sse-starlette: 2.1.3
> starlette: 0.50.0
> structlog: 25.5.0
> tenacity: 9.1.2
> truststore: 0.10.4
> typing-extensions: 4.15.0
> uuid-utils: 0.13.0
> uvicorn: 0.40.0
> watchfiles: 1.1.1
> zstandard: 0.25.0
Originally created by @khteh on GitHub (Jan 14, 2026). ### Checked other resources - [x] This is a bug, not a usage question. For questions, please use the LangChain Forum (https://forum.langchain.com/). - [x] I added a clear and detailed title that summarizes the issue. - [x] I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example). - [x] 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 ```python async def PostgreSQLStoreSetup(pool: AsyncConnectionPool) -> AsyncPostgresStore: # Set up the checkpointer (uncomment this line the first time you run the app) # Check if the checkpoints table exists store = AsyncPostgresStore(pool, index={ "embed": OllamaEmbeddings(model=appconfig.EMBEDDING_MODEL, base_url=appconfig.BASE_URI, num_ctx=8192, num_gpu=1, temperature=0), "dims": appconfig.EMBEDDING_DIMENSIONS, } ) async with pool.connection() as conn: async with conn.cursor() as cur: try: await cur.execute(""" SELECT EXISTS ( SELECT FROM information_schema.tables WHERE table_schema = 'public' AND table_name = 'store' ); """) table_exists = (await cur.fetchone())[0] if not table_exists: logging.info("Store table does not exist. Running setup...") await store.setup() # Run migrations. Done once else: logging.info("Store table already exists. Skipping setup.") except Error as e: logging.exception(f"Error checking for store table: {e}") # Optionally, you might want to raise this error raise e return store ``` ### Error Message and Stack Trace (if applicable) ```shell > Finished chain. Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/Python/rag-agent/src/rag_agent/RAGAgent.py", line 251, in <module> asyncio.run(main()) ~~~~~~~~~~~^^^^^^^^ File "/usr/lib/python3.13/asyncio/runners.py", line 195, in run return runner.run(main) ~~~~~~~~~~^^^^^^ File "/usr/lib/python3.13/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^ File "/usr/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete return future.result() ~~~~~~~~~~~~~^^ File "/usr/src/Python/rag-agent/src/rag_agent/RAGAgent.py", line 248, in main await rag.ChatAgent(config, input_message) File "/usr/src/Python/rag-agent/src/rag_agent/RAGAgent.py", line 190, in ChatAgent async for step in self._agent.astream( ...<5 lines>... step["messages"][-1].pretty_print() File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/pregel/main.py", line 2974, in astream async for _ in runner.atick( ...<13 lines>... yield o File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/pregel/_runner.py", line 304, in atick await arun_with_retry( ...<15 lines>... ) File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/pregel/_retry.py", line 138, in arun_with_retry return await task.proc.ainvoke(task.input, config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/_internal/_runnable.py", line 705, in ainvoke input = await asyncio.create_task( ^^^^^^^^^^^^^^^^^^^^^^^^^^ step.ainvoke(input, config, **kwargs), context=context ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/_internal/_runnable.py", line 473, in ainvoke ret = await self.afunc(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 845, in _afunc outputs = await asyncio.gather(*coros) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 1199, in _arun_one content = _handle_tool_error(e, flag=self._handle_tool_errors) File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 429, in _handle_tool_error content = flag(e) # type: ignore [assignment, call-arg] File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 386, in _default_handle_tool_errors raise e File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 1190, in _arun_one return await self._awrap_tool_call(tool_request, execute) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/deepagents/middleware/filesystem.py", line 1143, in awrap_tool_call tool_result = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 1181, in execute return await self._execute_tool_async(req, input_type, config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 1125, in _execute_tool_async content = _handle_tool_error(e, flag=self._handle_tool_errors) File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 429, in _handle_tool_error content = flag(e) # type: ignore [assignment, call-arg] File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 386, in _default_handle_tool_errors raise e File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 1082, in _execute_tool_async response = await tool.ainvoke(call_args, config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/structured.py", line 67, in ainvoke return await super().ainvoke(input, config, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/base.py", line 642, in ainvoke return await self.arun(tool_input, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/base.py", line 1117, in arun raise error_to_raise File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/base.py", line 1083, in arun response = await coro_with_context(coro, context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/structured.py", line 121, in _arun return await self.coroutine(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/deepagents/middleware/subagents.py", line 370, in atask result = await subagent.ainvoke(subagent_state, runtime.config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/pregel/main.py", line 3161, in ainvoke async for chunk in self.astream( ...<29 lines>... chunks.append(chunk) File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/pregel/main.py", line 2974, in astream async for _ in runner.atick( ...<13 lines>... yield o File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/pregel/_runner.py", line 304, in atick await arun_with_retry( ...<15 lines>... ) File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/pregel/_retry.py", line 138, in arun_with_retry return await task.proc.ainvoke(task.input, config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/_internal/_runnable.py", line 705, in ainvoke input = await asyncio.create_task( ^^^^^^^^^^^^^^^^^^^^^^^^^^ step.ainvoke(input, config, **kwargs), context=context ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/_internal/_runnable.py", line 473, in ainvoke ret = await self.afunc(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 845, in _afunc outputs = await asyncio.gather(*coros) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 1176, in _arun_one return await self._execute_tool_async(tool_request, input_type, config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 1125, in _execute_tool_async content = _handle_tool_error(e, flag=self._handle_tool_errors) File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 429, in _handle_tool_error content = flag(e) # type: ignore [assignment, call-arg] File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 386, in _default_handle_tool_errors raise e File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/prebuilt/tool_node.py", line 1082, in _execute_tool_async response = await tool.ainvoke(call_args, config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/structured.py", line 67, in ainvoke return await super().ainvoke(input, config, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/base.py", line 642, in ainvoke return await self.arun(tool_input, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/base.py", line 1117, in arun raise error_to_raise File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/base.py", line 1083, in arun response = await coro_with_context(coro, context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langchain_core/tools/structured.py", line 121, in _arun return await self.coroutine(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/src/rag_agent/Tools.py", line 122, in upsert_memory await store.aput( ...<3 lines>... ) File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/store/base/batch.py", line 151, in aput return await fut ^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/store/base/batch.py", line 347, in _run results = await s.abatch(dedupped) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/store/postgres/aio.py", line 172, in abatch await self._execute_batch(grouped_ops, results, conn) File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/store/postgres/aio.py", line 415, in _execute_batch async with self._cursor(pipeline=True) as cur: ~~~~~~~~~~~~^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/contextlib.py", line 221, in __aexit__ await anext(self.gen) File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/langgraph/store/postgres/aio.py", line 570, in _cursor conn.pipeline(), ~~~~~~~~~~~~~^^ File "/usr/lib/python3.13/contextlib.py", line 221, in __aexit__ await anext(self.gen) File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/psycopg/connection_async.py", line 481, in pipeline async with pipeline: ^^^^^^^^ File "/usr/src/Python/rag-agent/.venv/lib/python3.13/site-packages/psycopg/_pipeline_async.py", line 75, in __aexit__ raise exc2.with_traceback(None) psycopg.errors.DataException: expected 1536 dimensions, not 768 During task with name 'tools' and id 'b5e3ebcd-8775-cf78-ed5a-473a4cd4b320' During task with name 'tools' and id '11fb09d0-fb7a-094e-4e5a-b346c5f942fb' ``` ### Description Error inserting memory into PostgreSQL store. Why is there a mismatch in the `dims`? I tried changing the `dims` to `768`, remove `store` and `store_migrations` tables in the DB and call `.setup()` but to no avail! ### System Info ``` System Information ------------------ > OS: Linux > OS Version: #8-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov 14 21:44:46 UTC 2025 > Python Version: 3.13.7 (main, Jan 8 2026, 12:15:45) [GCC 15.2.0] Package Information ------------------- > langchain_core: 1.2.7 > langchain: 1.2.3 > langchain_community: 0.4.1 > langsmith: 0.6.2 > langchain_anthropic: 1.3.1 > langchain_classic: 1.0.1 > langchain_google_genai: 4.1.3 > langchain_neo4j: 0.7.0 > langchain_ollama: 1.0.1 > langchain_postgres: 0.0.16 > langchain_text_splitters: 1.1.0 > langgraph_api: 0.6.34 > langgraph_cli: 0.4.11 > langgraph_runtime_inmem: 0.22.0 > langgraph_sdk: 0.3.3 Optional packages not installed ------------------------------- > langserve Other Dependencies ------------------ > aiohttp: 3.13.3 > anthropic: 0.75.0 > asyncpg: 0.31.0 > blockbuster: 1.5.26 > click: 8.3.1 > cloudpickle: 3.1.2 > cryptography: 46.0.3 > dataclasses-json: 0.6.7 > filetype: 1.2.0 > google-genai: 1.57.0 > grpcio: 1.76.0 > grpcio-health-checking: 1.76.0 > grpcio-tools: 1.75.1 > httpx: 0.28.1 > httpx-sse: 0.4.3 > jsonpatch: 1.33 > jsonschema-rs: 0.29.1 > langgraph: 1.0.6 > langgraph-checkpoint: 4.0.0 > neo4j: 6.1.0 > neo4j-graphrag: 1.12.0 > numpy: 2.4.1 > ollama: 0.6.1 > opentelemetry-api: 1.39.1 > opentelemetry-exporter-otlp-proto-http: 1.39.1 > opentelemetry-sdk: 1.39.1 > orjson: 3.11.5 > packaging: 25.0 > pgvector: 0.3.6 > protobuf: 6.33.4 > psycopg: 3.3.2 > psycopg-pool: 3.3.0 > pydantic: 2.12.5 > pydantic-settings: 2.12.0 > pyjwt: 2.10.1 > pytest: 9.0.2 > python-dotenv: 1.2.1 > pyyaml: 6.0.3 > PyYAML: 6.0.3 > requests: 2.32.5 > requests-toolbelt: 1.0.0 > sqlalchemy: 2.0.45 > SQLAlchemy: 2.0.45 > sse-starlette: 2.1.3 > starlette: 0.50.0 > structlog: 25.5.0 > tenacity: 9.1.2 > truststore: 0.10.4 > typing-extensions: 4.15.0 > uuid-utils: 0.13.0 > uvicorn: 0.40.0 > watchfiles: 1.1.1 > zstandard: 0.25.0 ```
yindo added the bugpending labels 2026-02-20 17:43:09 -05:00
yindo closed this issue 2026-02-20 17:43:09 -05:00
Author
Owner

@Aparnap2 commented on GitHub (Jan 26, 2026):

The error psycopg.errors.DataException: expected 1536 dimensions, not 768 occurs because the store_vectors table in your PostgreSQL database was previously created with a vector column of size 1536 (the default for OpenAI's text-embedding-3-small), but you are now trying to insert vectors of size 768 (from your local Ollama model).

The store.setup() method runs database migrations. It checks the vector_migrations table to see which migrations have already been applied. Since the table creation migration has already run (when you used the 1536d model), setup() skips recreating the table, leaving the column defined as vector(1536).

Solution

Since you are in a development/setup phase, the easiest fix is to drop the vector table and the migration record so setup() can recreate them with the correct dimensions.

Run the following SQL in your database:

-- Drop the table containing the vectors with the wrong dimension
DROP TABLE IF EXISTS store_vectors;

-- Remove the migration record so setup() runs the table creation script again
-- (Assumes the CREATE TABLE migration is version 2, which matches current source)
DELETE FROM vector_migrations WHERE v >= 2; 

Alternatively, if you don't mind losing all data in the store, you can drop all related tables to ensure a completely clean state:

DROP TABLE IF EXISTS store_vectors;
DROP TABLE IF EXISTS vector_migrations;
DROP TABLE IF EXISTS store;
DROP TABLE IF EXISTS store_migrations;

After running these SQL commands, restart your application. The store.setup() call will detect that the tables (or migration records) are missing and recreate the store_vectors table using the dims=768 from your new configuration.

@Aparnap2 commented on GitHub (Jan 26, 2026): The error `psycopg.errors.DataException: expected 1536 dimensions, not 768` occurs because the `store_vectors` table in your PostgreSQL database was previously created with a vector column of size **1536** (the default for OpenAI's `text-embedding-3-small`), but you are now trying to insert vectors of size **768** (from your local Ollama model). The `store.setup()` method runs database migrations. It checks the `vector_migrations` table to see which migrations have already been applied. Since the table creation migration has already run (when you used the 1536d model), `setup()` skips recreating the table, leaving the column defined as `vector(1536)`. ### Solution Since you are in a development/setup phase, the easiest fix is to drop the vector table and the migration record so `setup()` can recreate them with the correct dimensions. Run the following SQL in your database: ```sql -- Drop the table containing the vectors with the wrong dimension DROP TABLE IF EXISTS store_vectors; -- Remove the migration record so setup() runs the table creation script again -- (Assumes the CREATE TABLE migration is version 2, which matches current source) DELETE FROM vector_migrations WHERE v >= 2; ``` Alternatively, if you don't mind losing all data in the store, you can drop all related tables to ensure a completely clean state: ```sql DROP TABLE IF EXISTS store_vectors; DROP TABLE IF EXISTS vector_migrations; DROP TABLE IF EXISTS store; DROP TABLE IF EXISTS store_migrations; ``` After running these SQL commands, restart your application. The `store.setup()` call will detect that the tables (or migration records) are missing and recreate the `store_vectors` table using the `dims=768` from your new configuration.
Author
Owner

@khteh commented on GitHub (Jan 26, 2026):

What's the difference between store and store_vectors? What do they do? Any reference documentation?

-- (Assumes the CREATE TABLE migration is version 2, which matches current source)

How do I find out the current version?

It seems that I removed the wrong tables. I will try your suggestion next time when I change to use other embeddings.

@khteh commented on GitHub (Jan 26, 2026): What's the difference between `store` and `store_vectors`? What do they do? Any reference documentation? > -- (Assumes the CREATE TABLE migration is version 2, which matches current source) How do I find out the current version? It seems that I removed the wrong tables. I will try your suggestion next time when I change to use other embeddings.
Author
Owner

@Aparnap2 commented on GitHub (Jan 27, 2026):

What's the difference between store and store_vectors? What do they do? Any reference documentation?

-- (Assumes the CREATE TABLE migration is version 2, which matches current source)

How do I find out the current version?

It seems that I removed the wrong tables. I will try your suggestion next time when I change to use other embeddings.

store vs store_vectors

In LangGraph's Postgres Store implementation, these two tables serve different purposes:

  • store: This is the primary table that holds your actual data. It stores JSON documents (memories, state, or other objects) keyed by a namespace (prefix) and a key. It functions as a key-value store with metadata like created_at and updated_at.
  • store_vectors: This is a secondary table used specifically for semantic search. It holds the vector embeddings generated from the documents in the store table. It has a Foreign Key relationship with store, meaning if you delete an item from store, its corresponding vectors in store_vectors are automatically deleted (Cascade).

How to find the current version

The system tracks versions using two specific tables: store_migrations and vector_migrations. You can query them directly in your database to find the current applied version.

SQL Query:

-- For the main store table version
SELECT max(v) FROM store_migrations;

-- For the vector store table version
SELECT max(v) FROM vector_migrations;

Reference Documentation (Code Source)

The definitions and migrations are located in libs/checkpoint-postgres/langgraph/store/postgres/base.py within the LangGraph repository.

  • Migration 0: Creates the store table.
  • Vector Migration 1: Creates the store_vectors table.

Recovering from "Removed Wrong Tables"

If you manually dropped the store or store_vectors tables but did not truncate the migration tables, the setup() function will fail to recreate them.

This happens because setup() checks store_migrations, sees that "Migration 0" (Create Table) is already marked as done, and skips it.

How to fix:
If you want to start fresh (and lose all data), drop the migration tracking tables as well:

DROP TABLE IF EXISTS store_migrations;
DROP TABLE IF EXISTS vector_migrations;
-- Now running store.setup() will recreate everything correctly
@Aparnap2 commented on GitHub (Jan 27, 2026): > What's the difference between `store` and `store_vectors`? What do they do? Any reference documentation? > > > -- (Assumes the CREATE TABLE migration is version 2, which matches current source) > > How do I find out the current version? > > It seems that I removed the wrong tables. I will try your suggestion next time when I change to use other embeddings. ### `store` vs `store_vectors` In LangGraph's Postgres Store implementation, these two tables serve different purposes: * **`store`**: This is the primary table that holds your actual data. It stores JSON documents (memories, state, or other objects) keyed by a `namespace` (prefix) and a `key`. It functions as a key-value store with metadata like `created_at` and `updated_at`. * **`store_vectors`**: This is a secondary table used specifically for **semantic search**. It holds the vector embeddings generated from the documents in the `store` table. It has a Foreign Key relationship with `store`, meaning if you delete an item from `store`, its corresponding vectors in `store_vectors` are automatically deleted (Cascade). ### How to find the current version The system tracks versions using two specific tables: `store_migrations` and `vector_migrations`. You can query them directly in your database to find the current applied version. **SQL Query:** ```sql -- For the main store table version SELECT max(v) FROM store_migrations; -- For the vector store table version SELECT max(v) FROM vector_migrations; ``` ### Reference Documentation (Code Source) The definitions and migrations are located in `libs/checkpoint-postgres/langgraph/store/postgres/base.py` within the LangGraph repository. * **Migration 0**: Creates the `store` table. * **Vector Migration 1**: Creates the `store_vectors` table. ### Recovering from "Removed Wrong Tables" If you manually dropped the `store` or `store_vectors` tables **but did not truncate the migration tables**, the `setup()` function will **fail to recreate them**. This happens because `setup()` checks `store_migrations`, sees that "Migration 0" (Create Table) is already marked as done, and skips it. **How to fix:** If you want to start fresh (and lose all data), drop the migration tracking tables as well: ```sql DROP TABLE IF EXISTS store_migrations; DROP TABLE IF EXISTS vector_migrations; -- Now running store.setup() will recreate everything correctly ```
Author
Owner

@khteh commented on GitHub (Jan 27, 2026):

store vs store_vectors

In LangGraph's Postgres Store implementation, these two tables serve different purposes:

  • store: This is the primary table that holds your actual data. It stores JSON documents (memories, state, or other objects) keyed by a namespace (prefix) and a key. It functions as a key-value store with metadata like created_at and updated_at.
  • store_vectors: This is a secondary table used specifically for semantic search. It holds the vector embeddings generated from the documents in the store table. It has a Foreign Key relationship with store, meaning if you delete an item from store, its corresponding vectors in store_vectors are automatically deleted (Cascade).

Where did you find this? Can you share the doc url? Thanks.

@khteh commented on GitHub (Jan 27, 2026): > ### `store` vs `store_vectors` > In LangGraph's Postgres Store implementation, these two tables serve different purposes: > > * **`store`**: This is the primary table that holds your actual data. It stores JSON documents (memories, state, or other objects) keyed by a `namespace` (prefix) and a `key`. It functions as a key-value store with metadata like `created_at` and `updated_at`. > * **`store_vectors`**: This is a secondary table used specifically for **semantic search**. It holds the vector embeddings generated from the documents in the `store` table. It has a Foreign Key relationship with `store`, meaning if you delete an item from `store`, its corresponding vectors in `store_vectors` are automatically deleted (Cascade). Where did you find this? Can you share the doc url? Thanks.
Author
Owner

@Aparnap2 commented on GitHub (Jan 27, 2026):

store vs store_vectors

In LangGraph's Postgres Store implementation, these two tables serve different purposes:

  • store: This is the primary table that holds your actual data. It stores JSON documents (memories, state, or other objects) keyed by a namespace (prefix) and a key. It functions as a key-value store with metadata like created_at and updated_at.
  • store_vectors: This is a secondary table used specifically for semantic search. It holds the vector embeddings generated from the documents in the store table. It has a Foreign Key relationship with store, meaning if you delete an item from store, its corresponding vectors in store_vectors are automatically deleted (Cascade).

Where did you find this? Can you share the doc url? Thanks.

I found this information by analyzing the source code for the langgraph-checkpoint-postgres library on GitHub.

Here are the details you asked for:

Reference URLs

The specific logic for the table schemas and migrations is defined in libs/checkpoint-postgres/langgraph/store/postgres/base.py.

Summary of Findings

  1. store Table:

    • Source: Defined in the MIGRATIONS list in base.py.
    • Purpose: Stores the raw JSON data (items) with metadata like prefix (namespace), key, value, created_at, and updated_at.
  2. store_vectors Table:

    • Source: Defined in the VECTOR_MIGRATIONS list in base.py.
    • Purpose: Stores the generated embeddings for items in the store table to enable semantic search. It is only created if you provide an index configuration when initializing the store.
  3. Versioning:

    • Source: The setup() method in base.py checks tables named store_migrations and vector_migrations to determine which SQL commands have already been run. This is why manually dropping the content tables (store) without dropping the migration tracking tables prevents setup() from repairing them.
@Aparnap2 commented on GitHub (Jan 27, 2026): > > ### `store` vs `store_vectors` > > In LangGraph's Postgres Store implementation, these two tables serve different purposes: > > > > * **`store`**: This is the primary table that holds your actual data. It stores JSON documents (memories, state, or other objects) keyed by a `namespace` (prefix) and a `key`. It functions as a key-value store with metadata like `created_at` and `updated_at`. > > * **`store_vectors`**: This is a secondary table used specifically for **semantic search**. It holds the vector embeddings generated from the documents in the `store` table. It has a Foreign Key relationship with `store`, meaning if you delete an item from `store`, its corresponding vectors in `store_vectors` are automatically deleted (Cascade). > > Where did you find this? Can you share the doc url? Thanks. *I found this information by analyzing the source code for the `langgraph-checkpoint-postgres` library on GitHub.* Here are the details you asked for: ### Reference URLs The specific logic for the table schemas and migrations is defined in `libs/checkpoint-postgres/langgraph/store/postgres/base.py`. * **Source Code (GitHub):** [https://github.com/langchain-ai/langgraph/blob/main/libs/checkpoint-postgres/langgraph/store/postgres/base.py](https://github.com/langchain-ai/langgraph/blob/main/libs/checkpoint-postgres/langgraph/store/postgres/base.py) *(Note: Search for `MIGRATIONS` and `VECTOR_MIGRATIONS` in this file to see the exact SQL used to create `store` and `store_vectors`.)* * **Official Documentation:** While there isn't a dedicated documentation page detailing the *internal* database schema, the usage of `PostgresStore` is documented here: [[LangGraph Storage Documentation](https://langchain-ai.github.io/langgraph/reference/store/#langgraph.store.postgres.PostgresStore)](https://langchain-ai.github.io/langgraph/reference/store/#langgraph.store.postgres.PostgresStore) ### Summary of Findings 1. **`store` Table**: * **Source:** Defined in the `MIGRATIONS` list in `base.py`. * **Purpose:** Stores the raw JSON data (items) with metadata like `prefix` (namespace), `key`, `value`, `created_at`, and `updated_at`. 2. **`store_vectors` Table**: * **Source:** Defined in the `VECTOR_MIGRATIONS` list in `base.py`. * **Purpose:** Stores the generated embeddings for items in the `store` table to enable semantic search. It is only created if you provide an `index` configuration when initializing the store. 3. **Versioning**: * **Source:** The `setup()` method in `base.py` checks tables named `store_migrations` and `vector_migrations` to determine which SQL commands have already been run. This is why manually dropping the content tables (`store`) without dropping the migration tracking tables prevents `setup()` from repairing them.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#1117