!3375 修复缺陷【表上带序列时,更新表数据存在内存泄露】

Merge pull request !3375 from cc_db_dev/fix_leak
This commit is contained in:
opengauss-bot
2023-04-27 03:26:01 +00:00
committed by Gitee

View File

@ -488,7 +488,11 @@ bool ExecComputeStoredUpdateExpr(ResultRelInfo *resultRelInfo, EState *estate, T
uint32 updated_colnum_resno;
Bitmapset* updatedCols = GetUpdatedColumns(resultRelInfo, estate);
/* use pertuple memory for trigger tuple */
oldContext = MemoryContextSwitchTo(GetPerTupleMemoryContext(estate));
HeapTuple oldtup = GetTupleForTrigger(estate, NULL, resultRelInfo, oldPartitionOid, bucketid, otid, LockTupleShared, NULL);
MemoryContextSwitchTo(oldContext);
RecoredUpdateExpr(resultRelInfo, estate, cmdtype);
/*