mirror of https://github.com/citusdata/citus.git
we should not log error in preprocess if attached partition is missing. (#6131)
parent
a1c630a16e
commit
b67abdd28c
|
@ -439,9 +439,18 @@ PreprocessAlterTableStmtAttachPartition(AlterTableStmt *alterTableStatement,
|
||||||
Oid parentRelationId = AlterTableLookupRelation(alterTableStatement,
|
Oid parentRelationId = AlterTableLookupRelation(alterTableStatement,
|
||||||
lockmode);
|
lockmode);
|
||||||
PartitionCmd *partitionCommand = (PartitionCmd *) alterTableCommand->def;
|
PartitionCmd *partitionCommand = (PartitionCmd *) alterTableCommand->def;
|
||||||
bool partitionMissingOk = false;
|
bool partitionMissingOk = true;
|
||||||
Oid partitionRelationId = RangeVarGetRelid(partitionCommand->name, lockmode,
|
Oid partitionRelationId = RangeVarGetRelid(partitionCommand->name, lockmode,
|
||||||
partitionMissingOk);
|
partitionMissingOk);
|
||||||
|
if (!OidIsValid(partitionRelationId))
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* We can stop propagation here instead of logging error. Pg will complain
|
||||||
|
* in standard_utility, so we are safe to stop here. We pass missing_ok
|
||||||
|
* as true to not diverge from pg output.
|
||||||
|
*/
|
||||||
|
return NIL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!IsCitusTable(parentRelationId))
|
if (!IsCitusTable(parentRelationId))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue