mirror of https://github.com/citusdata/citus.git
fixup! Cover postgres tables for CREATE TABLE commands when pg<13
parent
154c5baaa0
commit
8c24018679
|
@ -118,25 +118,25 @@ PreprocessDropTableStmt(Node *node, const char *queryString)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsCitusTableType(relationId, REFERENCE_TABLE))
|
|
||||||
{
|
|
||||||
/* prevent concurrent EnsureReferenceTablesExistOnAllNodes */
|
|
||||||
int colocationId = CreateReferenceTableColocationId();
|
|
||||||
LockColocationId(colocationId, ExclusiveLock);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* invalidate foreign key cache if the table involved in any foreign key */
|
/* invalidate foreign key cache if the table involved in any foreign key */
|
||||||
if ((TableReferenced(relationId) || TableReferencing(relationId)))
|
if ((TableReferenced(relationId) || TableReferencing(relationId)))
|
||||||
{
|
{
|
||||||
MarkInvalidateForeignKeyGraph();
|
MarkInvalidateForeignKeyGraph();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we're not interested in non-distributed relations */
|
/* we're not interested in non-distributed relations for the rest */
|
||||||
if (!IsCitusTable(relationId))
|
if (!IsCitusTable(relationId))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IsCitusTableType(relationId, REFERENCE_TABLE))
|
||||||
|
{
|
||||||
|
/* prevent concurrent EnsureReferenceTablesExistOnAllNodes */
|
||||||
|
int colocationId = CreateReferenceTableColocationId();
|
||||||
|
LockColocationId(colocationId, ExclusiveLock);
|
||||||
|
}
|
||||||
|
|
||||||
/* we're only interested in partitioned and mx tables */
|
/* we're only interested in partitioned and mx tables */
|
||||||
if (!ShouldSyncTableMetadata(relationId) || !PartitionedTable(relationId))
|
if (!ShouldSyncTableMetadata(relationId) || !PartitionedTable(relationId))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue