Repository navigation
feat(db): migrate control-plane persistence to PostgreSQL - #649
Open
liubing0806 wants to merge 30 commits into
Open
liubing0806 wants to merge 30 commits into
liubing0806 wants to merge 30 commits into
Conversation
This was referenced Oct 21, 2026
1 task done
liubing0806
marked this pull request as ready for review
October 22, 2026 02:47
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #647.
将控制面运行数据库从同步 SQLite 切换到 PostgreSQL 17,并提供现有数据和旧备份的离线迁移路径。运行时使用异步连接池和原生 PG SQL,SQLite 只用于读取旧快照及历史测试。
主要改动:
pg_dump导出快照与 VM/配置文件使用一致的暂停写入窗口;恢复校验归档范围、单事务恢复、重新加载状态,失败保持维护标记。验证(合成数据与专用 PG 17.11):
4ad444d7eee8f6e相同3054bfa04ad444d73054bfa04ad444d74ad444d76aa877de例如既有 unit 失败为实际 cache TTL
1h、预期undefined;既有 E2E 失败含 thinking 多display: summarized。逐断言对照和页面截图已提交在docs/plans/evidence/postgresql/。实现 head:
cf9462d5501c323efa95c254feb3821f7cf656f0。详见 实施验证报告 和 部署迁移说明。以 Draft 提交供迁移评审。原生 ARM64 构建运行、生产规模压测及现有部署切换未验证。VM 活凭据仍使用原有槽位/CLI-home 存储,切换必须保留这些目录和业务加密密钥。本 PR 提供共享持久化,尚不代表控制面已具备 #648 的多副本调度能力。