mirror of https://github.com/citusdata/citus.git
enable propagation warnings before postgres vanilla tests (#6081)
parent
b3dcfddeb3
commit
5f27445b69
|
@ -39,9 +39,12 @@ PreprocessClusterStmt(Node *node, const char *clusterCommand,
|
|||
|
||||
if (clusterStmt->relation == NULL)
|
||||
{
|
||||
ereport(WARNING, (errmsg("not propagating CLUSTER command to worker nodes"),
|
||||
errhint("Provide a specific table in order to CLUSTER "
|
||||
"distributed tables.")));
|
||||
if (EnableUnsupportedFeatureMessages)
|
||||
{
|
||||
ereport(WARNING, (errmsg("not propagating CLUSTER command to worker nodes"),
|
||||
errhint("Provide a specific table in order to CLUSTER "
|
||||
"distributed tables.")));
|
||||
}
|
||||
|
||||
return NIL;
|
||||
}
|
||||
|
|
|
@ -74,7 +74,11 @@ PostprocessCreateDistributedObjectFromCatalogStmt(Node *stmt, const char *queryS
|
|||
addresses);
|
||||
if (depError != NULL)
|
||||
{
|
||||
RaiseDeferredError(depError, WARNING);
|
||||
if (EnableUnsupportedFeatureMessages)
|
||||
{
|
||||
RaiseDeferredError(depError, WARNING);
|
||||
}
|
||||
|
||||
return NIL;
|
||||
}
|
||||
|
||||
|
|
|
@ -1387,7 +1387,11 @@ PostprocessCreateFunctionStmt(Node *node, const char *queryString)
|
|||
|
||||
if (errMsg != NULL)
|
||||
{
|
||||
RaiseDeferredError(errMsg, WARNING);
|
||||
if (EnableUnsupportedFeatureMessages)
|
||||
{
|
||||
RaiseDeferredError(errMsg, WARNING);
|
||||
}
|
||||
|
||||
return NIL;
|
||||
}
|
||||
|
||||
|
|
|
@ -1754,10 +1754,13 @@ List *
|
|||
PreprocessAlterTableMoveAllStmt(Node *node, const char *queryString,
|
||||
ProcessUtilityContext processUtilityContext)
|
||||
{
|
||||
ereport(WARNING, (errmsg("not propagating ALTER TABLE ALL IN TABLESPACE "
|
||||
"commands to worker nodes"),
|
||||
errhint("Connect to worker nodes directly to manually "
|
||||
"move all tables.")));
|
||||
if (EnableUnsupportedFeatureMessages)
|
||||
{
|
||||
ereport(WARNING, (errmsg("not propagating ALTER TABLE ALL IN TABLESPACE "
|
||||
"commands to worker nodes"),
|
||||
errhint("Connect to worker nodes directly to manually "
|
||||
"move all tables.")));
|
||||
}
|
||||
|
||||
return NIL;
|
||||
}
|
||||
|
|
|
@ -734,10 +734,14 @@ ProcessUtilityInternal(PlannedStmt *pstmt,
|
|||
if (IsA(parsetree, RenameStmt) && ((RenameStmt *) parsetree)->renameType ==
|
||||
OBJECT_ROLE && EnableAlterRolePropagation)
|
||||
{
|
||||
ereport(NOTICE, (errmsg("not propagating ALTER ROLE ... RENAME TO commands "
|
||||
"to worker nodes"),
|
||||
errhint("Connect to worker nodes directly to manually "
|
||||
"rename the role")));
|
||||
if (EnableUnsupportedFeatureMessages)
|
||||
{
|
||||
ereport(NOTICE, (errmsg(
|
||||
"not propagating ALTER ROLE ... RENAME TO commands "
|
||||
"to worker nodes"),
|
||||
errhint("Connect to worker nodes directly to manually "
|
||||
"rename the role")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include "distributed/local_executor.h"
|
||||
#include "distributed/local_distributed_join_planner.h"
|
||||
#include "distributed/locally_reserved_shared_connections.h"
|
||||
#include "distributed/log_utils.h"
|
||||
#include "distributed/maintenanced.h"
|
||||
#include "distributed/shard_cleaner.h"
|
||||
#include "distributed/metadata_utility.h"
|
||||
|
@ -1153,6 +1154,17 @@ RegisterCitusConfigVariables(void)
|
|||
GUC_STANDARD,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
DefineCustomBoolVariable(
|
||||
"citus.enable_unsupported_feature_messages",
|
||||
gettext_noop("Controls showing of some citus related messages. It is intended to "
|
||||
"be used before vanilla tests to stop unwanted citus messages."),
|
||||
NULL,
|
||||
&EnableUnsupportedFeatureMessages,
|
||||
true,
|
||||
PGC_SUSET,
|
||||
GUC_SUPERUSER_ONLY | GUC_NO_SHOW_ALL,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
DefineCustomBoolVariable(
|
||||
"citus.enable_version_checks",
|
||||
gettext_noop("Enables version checks during CREATE/ALTER EXTENSION commands"),
|
||||
|
|
|
@ -23,6 +23,12 @@
|
|||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* GUC controls showing of some of the unwanted citus messages, it is intended to be set false
|
||||
* before vanilla tests to not break postgres test logs.
|
||||
*/
|
||||
bool EnableUnsupportedFeatureMessages = true;
|
||||
|
||||
/*
|
||||
* IsLoggableLevel returns true if either of client or server log guc is configured to
|
||||
* log the given log level.
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
#define CITUS_LOG_LEVEL_OFF 0
|
||||
|
||||
|
||||
extern bool EnableUnsupportedFeatureMessages;
|
||||
|
||||
extern bool IsLoggableLevel(int logLevel);
|
||||
extern char * HashLogMessage(const char *text);
|
||||
|
||||
|
|
|
@ -500,6 +500,9 @@ if(!$vanillaDev && $vanillatest)
|
|||
{
|
||||
# we enable hiding the citus dependent objects from pg meta class queries to not break postgres vanilla test behaviour
|
||||
push(@pgOptions, "citus.hide_citus_dependent_objects=true");
|
||||
|
||||
# we disable citus related unwanted messages to not break postgres vanilla test behaviour.
|
||||
push(@pgOptions, "citus.enable_unsupported_feature_messages=false");
|
||||
}
|
||||
|
||||
if ($useMitmproxy)
|
||||
|
|
Loading…
Reference in New Issue