forked from huawei/openGauss-server
report_iud_time函数中try catch跳转后锁队列混乱
This commit is contained in:
parent
1a20907a0c
commit
fd31bfbba6
|
|
@ -170,10 +170,8 @@ static void report_iud_time(QueryDesc *query)
|
||||||
if (OidIsValid(rid) == false || rid < FirstNormalObjectId) {
|
if (OidIsValid(rid) == false || rid < FirstNormalObjectId) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
MemoryContext current_ctx = CurrentMemoryContext;
|
|
||||||
Relation rel = NULL;
|
Relation rel = NULL;
|
||||||
PG_TRY();
|
|
||||||
{
|
|
||||||
rel = heap_open(rid, AccessShareLock);
|
rel = heap_open(rid, AccessShareLock);
|
||||||
if (rel->rd_rel->relkind == RELKIND_RELATION) {
|
if (rel->rd_rel->relkind == RELKIND_RELATION) {
|
||||||
if (rel->rd_rel->relpersistence == RELPERSISTENCE_PERMANENT ||
|
if (rel->rd_rel->relpersistence == RELPERSISTENCE_PERMANENT ||
|
||||||
|
|
@ -183,19 +181,6 @@ static void report_iud_time(QueryDesc *query)
|
||||||
}
|
}
|
||||||
heap_close(rel, AccessShareLock);
|
heap_close(rel, AccessShareLock);
|
||||||
}
|
}
|
||||||
PG_CATCH();
|
|
||||||
{
|
|
||||||
(void)MemoryContextSwitchTo(current_ctx);
|
|
||||||
ErrorData *edata = CopyErrorData();
|
|
||||||
ereport(DEBUG1, (errmsg("Failed to send data changed time, cause: %s", edata->message)));
|
|
||||||
FlushErrorState();
|
|
||||||
FreeErrorData(edata);
|
|
||||||
if (rel != NULL) {
|
|
||||||
heap_close(rel, AccessShareLock);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
PG_END_TRY();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------
|
/* ----------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue