Offering: openGaussDev
More detail: # Conflicts: # src/gausskernel/storage/tcap/tcap_drop.cpp Match-id-fa7ce45964faefccb43c1539268d6621d9a8dafd
This commit is contained in:
@ -6327,6 +6327,8 @@ Oid AddNewIntervalPartition(Relation rel, void* insertTuple)
|
||||
*/
|
||||
CommandCounterIncrement();
|
||||
|
||||
UpdatePgObjectChangecsn(RelationGetRelid(rel), rel->rd_rel->relkind);
|
||||
|
||||
return newPartOid;
|
||||
}
|
||||
|
||||
|
||||
@ -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)) {
|
||||
|
||||
@ -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
Reference in New Issue
Block a user