未验证 提交 b88dd5c4 编写于 作者: P Paul Guo 提交者: GitHub

Invalidate relcache for pg_appendonly change. (#7437)

In Greenplum, data structure RelationData includes the related pg_appendonly
row for an ao table, when pg_appendonly changes for that ao table, we should
invalidate the relcache for it also to prevent possible inconsistency.

I can not find a real case to hit this after some tries, but this is an issue
we could hit in theory.

Reviewed-by: Hubert Zhang
Reviewed-by: Asim R P
Reviewed-by: Jimmy Yih
上级 44bb0d75
......@@ -1196,6 +1196,13 @@ CacheInvalidateHeapTuple(Relation relation,
relationId = gptup->localoid;
databaseId = MyDatabaseId;
}
else if (tupleRelId == AppendOnlyRelationId)
{
FormData_pg_appendonly *aotup = (FormData_pg_appendonly *) GETSTRUCT(tuple);
relationId = aotup->relid;
databaseId = MyDatabaseId;
}
else if (tupleRelId == IndexRelationId)
{
Form_pg_index indextup = (Form_pg_index) GETSTRUCT(tuple);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册