/* Reset some shared cluster-wide counters */ Datum pg_stat_reset_shared(PG_FUNCTION_ARGS) { char *target = text_to_cstring(PG_GETARG_TEXT_PP(0)); pgstat_reset_shared_counters(target); PG_RETURN_VOID(); }
/* Reset some shared cluster-wide counters */ Datum pg_stat_reset_shared(PG_FUNCTION_ARGS) { if (PG_ARGISNULL(0)) /* * Same error message as in pgstat_reset_shared_counters(), * to keep translations the same. */ ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("unrecognized reset target: \"%s\"", "null"), errhint("Target must be \"bgwriter\"."))); pgstat_reset_shared_counters(text_to_cstring(PG_GETARG_TEXT_PP(0))); PG_RETURN_VOID(); }