Offering: openGaussDev

More detail: 

# Conflicts:
#	src/gausskernel/storage/tcap/tcap_drop.cpp

Match-id-fa7ce45964faefccb43c1539268d6621d9a8dafd
This commit is contained in:
openGaussDev
2022-03-10 18:16:43 +08:00
committed by yanghao
parent a004cc661a
commit 734764285d
4 changed files with 1342 additions and 1324 deletions

View File

@ -6327,6 +6327,8 @@ Oid AddNewIntervalPartition(Relation rel, void* insertTuple)
*/
CommandCounterIncrement();
UpdatePgObjectChangecsn(RelationGetRelid(rel), rel->rd_rel->relkind);
return newPartOid;
}

View File

@ -377,6 +377,9 @@ void UpdatePgObjectChangecsn(Oid objectOid, PgObjectType objectType)
if (!CheckObjectExist(objectOid, objectType)) {
return;
}
if (u_sess->exec_cxt.isExecTrunc) {
return;
}
relation = heap_open(PgObjectRelationId, RowExclusiveLock);
tup = SearchSysCache2(PGOBJECTID, ObjectIdGetDatum(objectOid), CharGetDatum(objectType));
if (!HeapTupleIsValid(tup)) {

View File

@ -6159,6 +6159,11 @@ void renamePartition(RenameStmt* stmt)
/* Do the work */
renamePartitionInternal(partitionedTableOid, partitionOid, stmt->newname);
Relation parentRel = heap_openrv(stmt->relation, AccessExclusiveLock);
Oid relid = RelationGetRelid(parentRel);
UpdatePgObjectChangecsn(relid, parentRel->rd_rel->relkind);
heap_close(parentRel, NoLock);
}
/*
@ -6232,6 +6237,11 @@ void renamePartitionIndex(RenameStmt* stmt)
/* Do the work */
renamePartitionInternal(partitionedTableIndexOid, partitionIndexOid, stmt->newname);
Oid parRelOid = IndexGetRelation(partitionedTableIndexOid, false);
Relation partRel = RelationIdGetRelation(parRelOid);
UpdatePgObjectChangecsn(parRelOid, partRel->rd_rel->relkind);
RelationClose(partRel);
}
/*

File diff suppressed because it is too large Load Diff