fixup! Consider fkey graph invalidations due to CREATE TABLE cmds too

pull/4453/head
Onur Tirtir 2021-01-05 14:04:31 +03:00
parent eb3235d5dc
commit 154c5baaa0
1 changed files with 10 additions and 10 deletions

View File

@ -543,16 +543,6 @@ multi_ProcessUtility(PlannedStmt *pstmt,
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 (ops && ops->postprocess)
@ -587,6 +577,16 @@ multi_ProcessUtility(PlannedStmt *pstmt,
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 */
if (ddlJobs != NIL)
{