mirror of https://github.com/citusdata/citus.git
Fixes review comments
parent
18e3924530
commit
98111eed96
|
@ -28,6 +28,7 @@
|
|||
#include "utils/builtins.h"
|
||||
|
||||
#include "distributed/commands.h"
|
||||
#include "distributed/commands/utility_hook.h"
|
||||
#include "distributed/deparser.h"
|
||||
#include "distributed/listutils.h"
|
||||
#include "distributed/metadata_cache.h"
|
||||
|
@ -159,7 +160,7 @@ static void UnmarkObjectDistributedOnLocalMainDb(uint16 catalogRelId, Oid object
|
|||
bool
|
||||
RunPreprocessNonMainDBCommand(Node *parsetree)
|
||||
{
|
||||
if (IsMainDB)
|
||||
if (IsMainDB || !EnableDDLPropagation)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -215,7 +216,7 @@ RunPreprocessNonMainDBCommand(Node *parsetree)
|
|||
void
|
||||
RunPostprocessNonMainDBCommand(Node *parsetree)
|
||||
{
|
||||
if (IsMainDB || !GetNonMainDbDistributeObjectOps(parsetree))
|
||||
if (IsMainDB || !EnableDDLPropagation || !GetNonMainDbDistributeObjectOps(parsetree))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -252,12 +252,8 @@ citus_ProcessUtility(PlannedStmt *pstmt,
|
|||
* and if the command is a node-wide object management command that we
|
||||
* support from non-main databases.
|
||||
*/
|
||||
bool shouldSkipPrevUtilityHook = false;
|
||||
|
||||
if (EnableDDLPropagation)
|
||||
{
|
||||
shouldSkipPrevUtilityHook = RunPreprocessNonMainDBCommand(parsetree);
|
||||
}
|
||||
bool shouldSkipPrevUtilityHook = RunPreprocessNonMainDBCommand(parsetree);
|
||||
|
||||
if (!shouldSkipPrevUtilityHook)
|
||||
{
|
||||
|
@ -268,10 +264,8 @@ citus_ProcessUtility(PlannedStmt *pstmt,
|
|||
PrevProcessUtility(pstmt, queryString, false, context,
|
||||
params, queryEnv, dest, completionTag);
|
||||
}
|
||||
if (EnableDDLPropagation)
|
||||
{
|
||||
RunPostprocessNonMainDBCommand(parsetree);
|
||||
}
|
||||
|
||||
RunPostprocessNonMainDBCommand(parsetree);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue