-
Notifications
You must be signed in to change notification settings - Fork 0
Description
--- As of 2026-02-03T23:46:25.000Z ---
Andres Freund raises concerns about a recently committed pg_upgrade optimization that transfers pg_largeobject_metadata files when possible. He finds the implementation confusing because it both migrates the pg_largeobject_metadata table and performs COPY operations for large objects with comments or security labels. This appears to risk uniqueness violations, though it works because the COPY happens into a relfilenode that gets overwritten later. Freund argues this non-obvious behavior needs better documentation and questions its safety. He identifies potential issues including incorrect visibility maps when freezing pages on-access, and problems with different segment counts between old and new servers. He suggests the current approach could leave wrong visibility maps or fail to clean up additional segments, creating data corruption risks during upgrades.
Andres Freund对最近提交的一个pg_upgrade优化功能提出了担忧,该功能在可能的情况下传输pg_largeobject_metadata文件。他认为实现方式令人困惑,因为它既迁移pg_largeobject_metadata表,又对带有注释或安全标签的大对象执行COPY操作。这看起来有唯一性冲突的风险,但能正常工作是因为COPY操作发生在一个稍后会被覆盖的relfilenode中。Freund认为这种不明显的行为需要更好的文档说明,并质疑其安全性。他识别出潜在问题,包括在按需冻结页面时产生错误的可见性映射,以及新旧服务器之间段数不同时的问题。他认为当前方法可能留下错误的可见性映射或无法清理额外的段,在升级过程中造成数据损坏风险。
participants - 参与者: