-
Notifications
You must be signed in to change notification settings - Fork 148
Description
Help: Failed to switch from SQLite to PostgreSQL
In the mcp-host @ 0ad315a project, there is a script ./scripts/run_pg.sh which should allow switching to PostgreSQL.
I’ve already updated the frontend code in constant.ts to use the following DEF_DIVE_HTTPD_CONFIG:
{
"db": {
"uri": `postgresql://mcp:[email protected]:5444/mcp`,
"pool_size": 5,
"pool_recycle": 60,
"max_overflow": 10,
"echo": false,
"pool_pre_ping": true,
"migrate": true
},
"checkpointer": {
"uri": `postgresql://mcp:[email protected]:5444/mcp`
}
}I also replaced the database config in several dive_httpd.json files with the same PostgreSQL connection string:
{
"db": {
"uri": "postgresql://mcp:[email protected]:5444/mcp",
"pool_size": 5,
"pool_recycle": 60,
"max_overflow": 10,
"echo": false,
"pool_pre_ping": true,
"migrate": true
},
"checkpointer": {
"uri": "postgresql://mcp:[email protected]:5444/mcp"
}
}However, after starting the service, it gets stuck at loading (white screen).
It seems that the database auto-migration is missing several tables (e.g. writes, checkpoints).
I manually synced the schema and data from SQLite to PostgreSQL, but after starting, it still throws connection errors:
return current.parent.switch(awaitable)
...
asyncpg.exceptions.InvalidPasswordError: password authentication failed for user "mcp"
As a result, the dialog list cannot sync.
But actually, the PostgreSQL server has no connection restrictions.
👉 What should I do to make this work?