Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Managed Service for Greenplum®
  • Getting started
    • All guides
    • Connecting to a database
      • Role and user management
      • Managing resource groups
      • User authentication rules
      • Monitoring and managing sessions and queries in the Command Center
      • Managing client processes and user sessions
    • Connecting to an external file server (gpfdist)
    • Auxiliary utilities
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes

In this article:

  • View information about resource groups
  • Create a resource group
  • Assign a resource group to a role
  • View the current load of resource groups
  • View a list of queries in resource groups
  • Change resource group parameters
  • Delete a resource group
  • Example of creating a resource group
  1. Step-by-step guides
  2. Users and sessions
  3. Managing resource groups

Managing resource groups

Written by
Yandex Cloud
Updated at May 22, 2025
  • View information about resource groups
  • Create a resource group
  • Assign a resource group to a role
  • View the current load of resource groups
  • View a list of queries in resource groups
  • Change resource group parameters
  • Delete a resource group
  • Example of creating a resource group

You can manage cluster resource usage quotas using resource groups. To do this, connect to the cluster as the user with the mdb_admin role.

View information about resource groupsView information about resource groups

To view a list of resource groups and their parameter values, run the command:

SELECT * FROM gp_toolkit.gp_resgroup_config;

To view a list of roles and the resource groups they belong to, run the command:

SELECT rolname, rsgname FROM pg_roles, pg_resgroup
WHERE pg_roles.rolresgroup=pg_resgroup.oid;

Create a resource groupCreate a resource group

Pass the name of the resource group and its parameters in the command:

CREATE RESOURCE GROUP <resource_group_name> WITH (<parameter_1>, <parameter_2>, ...);

When creating a resource group, just specify the value of the CPU_RATE_LIMIT or CPUSET parameter. For the other parameters, the default settings will be applied.

Assign a resource group to a roleAssign a resource group to a role

To create a role and immediately assign it to a resource group, run the command:

CREATE ROLE <role_name> RESOURCE GROUP <resource_group_name>;

Note

By default, new roles are assigned to the default_group resource group.

To assign a different resource group to the role, run the command:

ALTER ROLE <role_name> RESOURCE GROUP <resource_group_name>;

View the current load of resource groupsView the current load of resource groups

In the entire cluster
On each host
In each segment
SELECT * FROM gp_toolkit.gp_resgroup_status;
SELECT * FROM gp_toolkit.gp_resgroup_status_per_host;
SELECT * FROM gp_toolkit.gp_resgroup_status_per_segment;

View a list of queries in resource groupsView a list of queries in resource groups

To see a list of queries in progress and in the queue, run the command:

SELECT query, waiting, rsgname, rsgqueueduration
FROM pg_stat_activity;

Change resource group parametersChange resource group parameters

Run this command:

ALTER RESOURCE GROUP <resource_group_name> SET <parameter_name> <new_parameter_value>;

Delete a resource groupDelete a resource group

You can delete a resource group only if it isn't assigned to any roles and contains no transactions in progress or in the queue.

To delete a resource group, run the command:

DROP RESOURCE GROUP <resource_group_name>;

Example of creating a resource groupExample of creating a resource group

Create a resource group with test characteristics:

  • Name: testgroup.
  • Maximum number of processed transactions: 15.
  • Share of CPU resources used in the segment: 10%.
  • RAM share in the segment: 20%.
  • Share allocated as an overall quota: 50%.
  • RAM share in the resource group that a single transaction operator can occupy: 30%.

Run this command:

CREATE RESOURCE GROUP testgroup
WITH (CONCURRENCY=15, CPU_RATE_LIMIT=10, MEMORY_LIMIT=20, MEMORY_SHARED_QUOTA=50, MEMORY_SPILL_RATIO=30);

Check that the new resource group appeared in the list:

SELECT * FROM gp_toolkit.gp_resgroup_config;

Greenplum® and Greenplum Database® are registered trademarks or trademarks of Broadcom Inc. in the United States and/or other countries.

Was the article helpful?

Previous
Role and user management
Next
User authentication rules
Yandex project
© 2025 Yandex.Cloud LLC