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