You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When MOS_ENABLE_REORGANIZE=true and the graph backend is PostgresGraphDB, the background structure optimization thread crashes because several methods exist on Neo4jGraphDB but are missing or incompatible on PostgresGraphDB.
Observed runtime error:
AttributeError: 'PostgresGraphDB' object has no attribute 'node_not_exist'
After that is patched, the next failures are typically get_memory_count, get_edges, or edge_exists(..., direction=..., user_name=...).
Run MemOS Product API with Postgres graph backend and MOS_ENABLE_REORGANIZE=true.
Add memories via /product/add until the reorganizer background thread runs structure optimization.
Observe logs from _run_structure_optimization_periodically / optimize_structure.
Environment
Python: 3.11
Operating System: Linux (Docker)
MemOS: main branch
Graph backend: postgres + pgvector
MOS_ENABLE_REORGANIZE=true
Additional Context
Postgres backend should expose the same graph-store interface used by tree text memory reorganizer and handler so redundant-memory merge can create MERGED_TO edges without crashing.
Bug Description
When
MOS_ENABLE_REORGANIZE=trueand the graph backend isPostgresGraphDB, the background structure optimization thread crashes because several methods exist onNeo4jGraphDBbut are missing or incompatible onPostgresGraphDB.Observed runtime error:
After that is patched, the next failures are typically
get_memory_count,get_edges, oredge_exists(..., direction=..., user_name=...).node_not_exist(scope, user_name)reorganizer.optimize_structureget_memory_count(memory_type, user_name)reorganizer.optimize_structureget_edges(id, type, direction, user_name)handler._resolve_in_graph,manager._inherit_edgesedge_exists(..., direction=..., user_name=...)get_structure_optimization_candidates(..., user_name=...)search_by_fulltext(...)How to Reproduce
MOS_ENABLE_REORGANIZE=true./product/adduntil the reorganizer background thread runs structure optimization._run_structure_optimization_periodically/optimize_structure.Environment
MOS_ENABLE_REORGANIZE=trueAdditional Context
MERGED_TOedges without crashing.fix/postgres-reorganizer-compat(PR fix: PostgresGraphDB reorganizer/handler compatibility #2273).