dbx
dbx copied to clipboard
[Compatibility] Greenplum AO 表和视图可编辑查询因 ctid/xmin 注入不兼容报错
来源
QQ 群反馈 · 反馈人:冇
数据库类型和版本
Greenplum
AI 摘要
Greenplum AO 表和视图执行可编辑单表查询时,因注入 ctid/xmin 行标识不兼容,导致 Invalid attnum / column tableoid does not exist 错误。建议按 relstorage/relkind 判断,失败时降级为只读。
原始描述
Greenplum AO 表和视图执行可编辑单表查询时报 Invalid attnum / column tableoid does not exist,原因是注入 ctid/xmin 行标识不兼容,建议按 relstorage/relkind 判断并失败时降级只读
结论:该问题在 main 上已由 e7d19408f(fix(postgres): block tuple locator on Greenplum, Cloudberry, Hologres,2026-11-13)修复,升级到包含该提交的版本即可。
- 修复方式与建议一致:对原生 postgres 连接探测
SELECT version(),保留完整产品串,并把所有 ctid/tableoid/xmin 注入点收敛到同一个共享谓词postgresTupleLocatorUnsupportedEngine(产品串含 greenplum / cloudberry / hologres 任一即命中),命中后不再注入元组定位列; - 该谓词同时覆盖 Greenplum(含 AO 表的
virtual tuple slot does not have system attributes/Invalid attnum: -3)与 Cloudberry、Hologres(#12647,tableoid直接被拒); - 视图场景由既有的视图门控(非
BASE TABLE/TABLE不走元组定位)兜底。
报告者版本未标注,但 v0.6.70-beta.20261112.1 早于该修复(11-13 17:45 合入 main),升级即可。若升级后 AO 表可编辑查询仍报错,欢迎补充新的报错信息。