mirror of https://github.com/citusdata/citus.git
fixup! Consider fkey graph invalidations due to CREATE TABLE cmds too
parent
eb3235d5dc
commit
154c5baaa0
|
@ -543,16 +543,6 @@ multi_ProcessUtility(PlannedStmt *pstmt,
|
||||||
PostprocessCreateTableStmt(createStatement, queryString);
|
PostprocessCreateTableStmt(createStatement, queryString);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Re-forming the foreign key graph relies on the command being executed
|
|
||||||
* on the local table first. However, in order to decide whether the
|
|
||||||
* command leads to an invalidation, we need to check before the command
|
|
||||||
* is being executed since we read pg_constraint table. Thus, we maintain a
|
|
||||||
* local flag and do the invalidation after multi_ProcessUtility,
|
|
||||||
* before ExecuteDistributedDDLJob().
|
|
||||||
*/
|
|
||||||
InvalidateForeignKeyGraphForDDL();
|
|
||||||
|
|
||||||
if (EnableDDLPropagation)
|
if (EnableDDLPropagation)
|
||||||
{
|
{
|
||||||
if (ops && ops->postprocess)
|
if (ops && ops->postprocess)
|
||||||
|
@ -587,6 +577,16 @@ multi_ProcessUtility(PlannedStmt *pstmt,
|
||||||
PostprocessAlterTableStmtAttachPartition(alterTableStatement, queryString);
|
PostprocessAlterTableStmtAttachPartition(alterTableStatement, queryString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Re-forming the foreign key graph relies on the command being executed
|
||||||
|
* on the local table first. However, in order to decide whether the
|
||||||
|
* command leads to an invalidation, we need to check before the command
|
||||||
|
* is being executed since we read pg_constraint table. Thus, we maintain a
|
||||||
|
* local flag and do the invalidation after multi_ProcessUtility,
|
||||||
|
* before ExecuteDistributedDDLJob().
|
||||||
|
*/
|
||||||
|
InvalidateForeignKeyGraphForDDL();
|
||||||
|
|
||||||
/* after local command has completed, finish by executing worker DDLJobs, if any */
|
/* after local command has completed, finish by executing worker DDLJobs, if any */
|
||||||
if (ddlJobs != NIL)
|
if (ddlJobs != NIL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue