Skip to content

Disable utility mode in singlenode deployment #123

@wfnuser

Description

@wfnuser

Utilty mode is not necessary in singlenode deployment.
But if we disable directly, many of the isolaiton tests will be broken. "1U:" grammar require connection to be set in utility mode.

Can be fixed by this.

void
assign_gp_role(const char *newval, void *extra)
{
	/*
	 * Since postgres don't have utility mode, singlenode mode should not support
	 * utility mode either.
	 */
	if (Gp_role == GP_ROLE_SINGLENODE && string_to_role(newval) == GP_ROLE_UTILITY)
	{
		ereport(ERROR,
				(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
					errmsg("utility mode is not supported in ")));
	}

	Gp_role = string_to_role(newval);

	if (IS_UTILITY_OR_SINGLENODE(Gp_role) && MyProc != NULL)
		MyProc->mppIsWriter = false;
}

Singlenode role should not be used to connect to any of the cluster node either. Can be taken into consideration along with this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions