/* * gpvars_assign_gp_interconnect_type * gpvars_show_gp_interconnect_type */ const char * gpvars_assign_gp_interconnect_type(const char *newval, bool doit, GucSource source __attribute__((unused)) ) { int newtype = 0; if (newval == NULL || newval[0] == 0) newtype = INTERCONNECT_TYPE_UDPIFC; else if (!pg_strcasecmp("udpifc", newval)) newtype = INTERCONNECT_TYPE_UDPIFC; else elog(ERROR, "Only support UDPIFC, (current type is '%s')", gpvars_show_gp_interconnect_type()); if (doit) { Gp_interconnect_type = newtype; } return newval; } /* gpvars_assign_gp_log_interconnect */
/* * gpvars_assign_gp_interconnect_type * gpvars_show_gp_interconnect_type */ const char * gpvars_assign_gp_interconnect_type(const char *newval, bool doit, GucSource source __attribute__((unused)) ) { int newtype = 0; if (newval == NULL || newval[0] == 0 || !pg_strcasecmp("tcp", newval)) newtype = INTERCONNECT_TYPE_TCP; else if (!pg_strcasecmp("udp", newval)) newtype = INTERCONNECT_TYPE_UDP; else if (!pg_strcasecmp("nil", newval)) newtype = INTERCONNECT_TYPE_NIL; else elog(ERROR, "Unknown interconnect type. (current type is '%s')", gpvars_show_gp_interconnect_type()); if (doit) { if (newtype == INTERCONNECT_TYPE_NIL) { if (Gp_role == GP_ROLE_DISPATCH) elog(WARNING, "Nil-Interconnect diagnostic mode enabled (tuple will be dropped)."); else elog(LOG, "Nil-Interconnect diagnostic mode enabled (tuple will be dropped)."); } else if (Gp_interconnect_type == INTERCONNECT_TYPE_NIL) { if (Gp_role == GP_ROLE_DISPATCH) elog(WARNING, "Nil-Interconnect diagnostic mode disabled."); else elog(LOG, "Nil-Interconnect diagnostic mode disabled."); } Gp_interconnect_type = newtype; } return newval; } /* gpvars_assign_gp_log_interconnect */