Updating Greenplum® cluster settings
After creating a cluster, you can:
- Change the cluster name and description.
- Change the public access setting.
- Change additional cluster settings.
- Edit the scheduled maintenance operations settings.
- Update settings Greenplum® according to the Greenplum® documentation.
- Change the host class.
- Increase storage size.
To move a cluster to a different availability zone, restore it from a backup. While restoring the cluster, specify a new availability zone. You will thus move the cluster hosts.
If you use external data sources for PXF operations, learn how to configure the protocol. This will allow you to optimize operations with external data.
Changing the cluster name and description
- Go to the folder page
and select Managed Service for Greenplum. - Select the cluster and click Edit at the top of the page.
- Under Basic parameters, enter a new name and description for the cluster.
- Click Save.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To change the name and description of a Greenplum® cluster:
-
View the current
name
anddescription
of the cluster:yc managed-greenplum cluster get <cluster_name_or_ID>
-
View a description of the update cluster configuration CLI command:
yc managed-greenplum cluster update --help
-
Enter a new name and description for the cluster:
yc managed-greenplum cluster update <cluster_name_or_ID> \ --new-name <new_cluster_name> \ --description <new_cluster_description>
Alert
Do not change the cluster name using Terraform. This will delete the existing cluster and create a new one.
To update the cluster description:
-
Open the current Terraform configuration file with an infrastructure plan.
For more information about creating this file, see Creating clusters.
For a complete list of available Managed Service for Greenplum® cluster configuration fields, see the Terraform provider documentation
. -
In the Managed Service for Greenplum® cluster description, change the
description
attribute value:resource "yandex_mdb_greenplum_cluster" "<cluster_name>" { name = "<cluster_name>" description = "<new_cluster_description>" ... }
-
Make sure the settings are correct.
-
Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.
-
Run the command:
terraform validate
If there are errors in the configuration files, Terraform will point to them.
-
-
Confirm updating the resources.
-
Run the command to view planned changes:
terraform plan
If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.
-
If you are happy with the planned changes, apply them:
-
Run the command:
terraform apply
-
Confirm the update of resources.
-
Wait for the operation to complete.
-
Warning
The Terraform provider limits the amount of time for all Managed Service for Greenplum® cluster operations to complete to 120 minutes.
Operations exceeding the set timeout are interrupted.
How do I change these limits?
Add the
timeouts
block to the cluster description, for example:resource "yandex_mdb_greenplum_cluster" "<cluster name>" { ... timeouts { create = "1h30m" # 1 hour 30 minutes update = "2h" # 2 hours delete = "30m" # 30 minutes } }
-
-
Get an IAM token for API authentication and put it into the environment variable:
export IAM_TOKEN="<IAM_token>"
-
Use the Cluster.Update method and make a request, e.g., via cURL
:Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the
updateMask
parameter as a single comma-separated string.curl \ --request PATCH \ --header "Authorization: Bearer $IAM_TOKEN" \ --header "Content-Type: application/json" \ --url 'https://mdb.api.cloud.yandex.net/managed-greenplum/v1/clusters/<cluster_ID>' \ --data '{ "updateMask": "name,description", "name": "<new_cluster_name>", "description": "<new_cluster_description>" }'
Where
updateMask
is the list of parameters to update as a single string, separated by commas.You can get the cluster ID with a list of clusters in the folder.
-
View the server response to make sure the request was successful.
-
Get an IAM token for API authentication and put it into the environment variable:
export IAM_TOKEN="<IAM_token>"
-
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
Below, we assume the repository contents are stored in the
~/cloudapi/
directory. -
Use the ClusterService.Update call and make a request, e.g., via gRPCurl
:Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the
update_mask
parameter as an array ofpaths[]
strings.Format for listing settings
"update_mask": { "paths": [ "<setting_1>", "<setting_2>", ... "<setting_N>" ] }
grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/mdb/greenplum/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d '{ "cluster_id": "<cluster_ID>", "update_mask": { "paths": [ "name", "description" ] }, "name": "<new_cluster_name>", "description": "<new_cluster_description>" }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.greenplum.v1.ClusterService.Update
Where
update_mask
is the list of parameters to update as an array ofpaths[]
strings.You can get the cluster ID with a list of clusters in the folder.
-
View the server response to make sure the request was successful.
Change the public access setting
- Go to the folder page
and select Managed Service for Greenplum®. - Select the cluster and click Edit at the top of the page.
- Under Network settings, enable or disable Public access.
- Click Save.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To change the public access setting Greenplum®:
-
View a description of the update cluster configuration CLI command:
yc managed-greenplum cluster update --help
-
Configure public access in the
--assign-public-ip
parameter:yc managed-greenplum cluster update <cluster_name_or_ID> \ --assign-public-ip=<public_access_to_cluster>
Where
assign-public-ip
is public access to the cluster, true or false.
-
Get an IAM token for API authentication and put it into the environment variable:
export IAM_TOKEN="<IAM_token>"
-
Use the Cluster.Update method and make a request, e.g., via cURL
:Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the
updateMask
parameter as a single comma-separated string.curl \ --request PATCH \ --header "Authorization: Bearer $IAM_TOKEN" \ --header "Content-Type: application/json" \ --url 'https://mdb.api.cloud.yandex.net/managed-greenplum/v1/clusters/<cluster_ID>' \ --data '{ "updateMask": "config.assignPublicIp", "config": { "assignPublicIp": <public_access_to_cluster_hosts> } }'
Where:
-
updateMask
: List of parameters to update as a single string, separated by commas.Only one parameter is provided in this case.
-
assignPublicIp
: Public access to cluster hosts,true
orfalse
.
You can get the cluster ID with a list of clusters in the folder.
-
-
View the server response to make sure the request was successful.
-
Get an IAM token for API authentication and put it into the environment variable:
export IAM_TOKEN="<IAM_token>"
-
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
Below, we assume the repository contents are stored in the
~/cloudapi/
directory. -
Use the ClusterService.Update call and make a request, e.g., via gRPCurl
:Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the
update_mask
parameter as an array ofpaths[]
strings.Format for listing settings
"update_mask": { "paths": [ "<setting_1>", "<setting_2>", ... "<setting_N>" ] }
grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/mdb/greenplum/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d '{ "cluster_id": "<cluster_ID>", "update_mask": { "paths": [ "config.assign_public_ip" ] }, "config": { "assign_public_ip": <public_access_to_cluster_hosts> } }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.greenplum.v1.ClusterService.Update
Where:
-
update_mask
: List of parameters to update as an array ofpaths[]
strings.Only one parameter is provided in this case.
-
assign_public_ip
: Public access to cluster hosts,true
orfalse
.
You can get the cluster ID with a list of clusters in the folder.
-
-
View the server response to make sure the request was successful.
Tip
If you enabled public access to the cluster but cannot access it from the internet:
- Check the security group settings.
- Wait a while. It may take some time to enable public access.
Changing additional cluster settings
-
Go to the folder page and select Managed Service for Greenplum.
-
Select the cluster and click Edit in the top panel.
-
Change additional cluster settings:
-
Backup start time (UTC): Time interval during which the cluster backup starts. Time is specified in 24-hour UTC format. The default time is
22:00 - 23:00
UTC. -
Maintenance window: Maintenance window settings:
- To enable maintenance at any time, select arbitrary (default).
- To specify the preferred maintenance start time, select by schedule and specify the desired day of the week and UTC hour. For example, you can choose a time when the cluster is least loaded.
Maintenance operations are carried out both on enabled and disabled clusters. They may include updating the DBMS, applying patches, and so on.
-
DataLens access: Allows you to analyze cluster data in Yandex DataLens.
-
The Yandex Query access option enables you to run YQL queries from Yandex Query to a managed database in Managed Service for Greenplum®.
-
Deletion protection: Manages protection of the cluster, its databases, and users against accidental deletion.
Enabled deletion protection will not prevent a manual connection with the purpose to delete database contents.
-
Hybrid storage: Enables the Yandex Cloud Yezzey extension
in clusters with Greenplum® 6.25 or higher. This extension is used to export AO and AOCO tables from disks within the Managed Service for Greenplum® cluster to a cold storage in Yandex Object Storage. This way, the data will be stored in a service bucket in a compressed and encrypted form. This is a more cost-efficient storage method.You cannot disable this option after you save your cluster settings.
Note
This feature is at the Preview stage and is free of charge.
-
Connection pooler: Operation mode and parameters of the connection pooler:
- Mode:
SESSION
(session mode, default) orTRANSACTION
(transaction mode). - Size: Maximum number of client connections.
- Client Idle Timeout: Client idle time (in ms), after which the connection will be terminated.
- Mode:
-
-
Click Save.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To change additional cluster settings:
-
View the description of the update cluster CLI command:
yc managed-greenplum cluster update --help
-
Run the following command with a list of settings to update:
yc managed-greenplum cluster update <cluster_name_or_ID> \ --backup-window-start <backup_start_time> \ --datalens-access=<access_from_DataLens> \ --yandexquery-access=<access_from_Yandex_Query> \ --maintenance-window type=<maintenance_type>,` `day=<day_of_week>,` `hour=<hour> \ --deletion-protection
You can change the following settings:
--backup-window-start
: The cluster backup start time, set in UTC formatHH:MM:SS
. If the time is not set, the backup will start at 22:00 UTC.
-
--datalens-access
: Access to the cluster from Yandex DataLens,true
orfalse
. -
--yandexquery-access
: Access to the cluster from Yandex Query,true
orfalse
. -
--maintenance-window
: Maintenance window settings (including for disabled clusters), wheretype
is the maintenance type:anytime
(default): Any time.weekly
: On a schedule. If setting this value, specify the day of week and the hour:day
: Day of week inDDD
format:MON
,TUE
,WED
,THU
,FRI
,SAT
, orSUN
.hour
: Hour (UTC) inHH
format:1
to24
.
-
--deletion-protection
: Protection of the cluster, its databases, and users against accidental deletion.Enabled deletion protection will not prevent a manual connection with the purpose to delete database contents.
You can get the cluster name with a list of clusters in the folder.
-
Open the current Terraform configuration file with an infrastructure plan.
For more information about creating this file, see Creating clusters.
For a complete list of available Managed Service for Greenplum® cluster configuration fields, see the Terraform provider documentation
. -
In the Managed Service for Greenplum® cluster description, change the values of the required additional settings:
resource "yandex_mdb_greenplum_cluster" "<cluster_name>" { ... backup_window_start { hours = <backup_period_start> } maintenance_window { type = <maintenance_type> day = <day_of_week> hour = <hour> } access { data_lens = <access_from_DataLens> yandex_query = <access_from_Yandex_Query> } deletion_protection = <deletion_protection> cloud_storage { enable = <hybrid_storage_use> } pooler_config { pooling_mode = <operation_mode> pool_size = <size> pool_client_idle_timeout = <client_timeout> } }
You can change the following settings:
-
backup_window_start.hours
: Start of the period for initiating cluster backup. It is set in UTC inHH
format: from0
to23
. -
maintenance_window
: Maintenance window settings (including for disabled clusters):type
: Maintenance type. The possible values include:ANYTIME
: Anytime.WEEKLY
: On a schedule.
day
: Day of the week inDDD
format for theWEEKLY
type, e.g.,MON
.hour
: Hour UTC inHH
format for theWEEKLY
type, e.g.,21
.
-
access.data_lens
: Access to the cluster from Yandex DataLens,true
orfalse
. -
access.yandex_query
: Access to the cluster from Yandex Query,true
orfalse
. -
deletion_protection
: Protection of the cluster, its databases, and users against deletion,true
orfalse
value.Cluster deletion protection will not prevent a manual connection to a cluster to delete data.
-
cloud_storage.enable
: Use of hybrid storage in clusters with Greenplum® 6.25 or higher. Set it totrue
to enable the Yandex Cloud Yezzey extension in a cluster. This extension is used to export AO and AOCO tables from disks within the Managed Service for Greenplum® cluster to a cold storage in Yandex Object Storage. This way, the data will be stored in a service bucket in a compressed and encrypted form. This is a more cost-efficient storage method.You cannot disable hybrid storage after you save your cluster settings.
Note
This feature is at the Preview stage and is free of charge.
-
pooler_config
: Connection pooler settings:pooling_mode
: Operation mode,SESSION
orTRANSACTION
.pool_size
: Maximum number of client connections.pool_client_idle_timeout
: Idle timeout for a client connection (in ms).
-
-
Make sure the settings are correct.
-
Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.
-
Run the command:
terraform validate
If there are errors in the configuration files, Terraform will point to them.
-
-
Confirm updating the resources.
-
Run the command to view planned changes:
terraform plan
If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.
-
If you are happy with the planned changes, apply them:
-
Run the command:
terraform apply
-
Confirm the update of resources.
-
Wait for the operation to complete.
-
Warning
The Terraform provider limits the amount of time for all Managed Service for Greenplum® cluster operations to complete to 120 minutes.
Operations exceeding the set timeout are interrupted.
How do I change these limits?
Add the
timeouts
block to the cluster description, for example:resource "yandex_mdb_greenplum_cluster" "<cluster name>" { ... timeouts { create = "1h30m" # 1 hour 30 minutes update = "2h" # 2 hours delete = "30m" # 30 minutes } }
-
-
Get an IAM token for API authentication and put it into the environment variable:
export IAM_TOKEN="<IAM_token>"
-
Create a file named
body.json
and add the following contents to it:Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the
updateMask
parameter as a single comma-separated string.{ "updateMask": "config.backupWindowStart,config.access.dataLens,config.access.yandexQuery,maintenanceWindow,deletionProtection,configSpec.pool.mode,configSpec.pool.size,configSpec.pool.clientIdleTimeout,cloudStorage", "config": { "backupWindowStart": { "hours": "<hours>", "minutes": "<minutes>", "seconds": "<seconds>", "nanos": "<nanoseconds>" }, "access": { "dataLens": <access_from_DataLens>, "yandexQuery": <access_from_Yandex_Query> } }, "maintenanceWindow": { "weeklyMaintenanceWindow": { "day": "<day_of_week>", "hour": "<hour>" } }, "deletionProtection": <cluster_deletion_protection>, "configSpec": { "pool": { "mode": "<operation_mode>", "size": "<number_of_client_connections>", "clientIdleTimeout": "<client_timeout>" } }, "cloudStorage": { "enable": <hybrid_storage_use> } }
Where:
-
updateMask
: List of parameters to update as a single string, separated by commas. -
config
: Cluster settings:-
backupWindowStart
: Backup window settings.In this parameter, specify the backup start time:
hours
: Between0
and23
hours.minutes
: Between0
and59
minutes.seconds
: Between0
and59
seconds.nanos
: Between0
and999999999
nanoseconds.
-
access
: Cluster settings for access to the following Yandex Cloud services:dataLens
: Yandex DataLens,true
orfalse
.yandexQuery
: Yandex Query,true
orfalse
.
-
-
maintenanceWindow
: Maintenance window settings (including for disabled clusters). Provide one of the two parameters:-
anytime
: Maintenance can take place at any time. -
weeklyMaintenanceWindow
: Maintenance takes place once a week at the specified time:day
: Day of week inDDD
format:MON
,TUE
,WED
,THU
,FRI
,SAT
, orSUN
.hour
: Hour of day (UTC), from1
to24
.
-
-
deletionProtection
: Cluster deletion protection,true
orfalse
.Enabled deletion protection will not prevent a manual connection with the purpose to delete database contents.
-
configSpec.pool
: Connection pooler settings:mode
: Operation mode,SESSION
orTRANSACTION
.size
: Maximum number of client connections.clientIdleTimeout
: Idle timeout for a client connection (in ms).
-
cloudStorage.enable
: Use of hybrid storage in clusters with Greenplum® 6.25 or higher. Set it totrue
to enable the Yandex Cloud Yezzey extension in a cluster. This extension is used to export AO and AOCO tables from disks within the Managed Service for Greenplum® cluster to a cold storage in Yandex Object Storage. This way, the data will be stored in a service bucket in a compressed and encrypted form. This is a more cost-efficient storage method.You cannot disable hybrid storage after you save your cluster settings.
Note
This feature is at the Preview stage and is free of charge.
-
-
Use the Cluster.Update method and make a request, e.g., via cURL
:curl \ --request PATCH \ --header "Authorization: Bearer $IAM_TOKEN" \ --header "Content-Type: application/json" \ --url 'https://mdb.api.cloud.yandex.net/managed-greenplum/v1/clusters/<cluster_ID>' \ --data "@body.json"
You can get the cluster ID with a list of clusters in the folder.
-
View the server response to make sure the request was successful.
-
Get an IAM token for API authentication and put it into the environment variable:
export IAM_TOKEN="<IAM_token>"
-
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
Below, we assume the repository contents are stored in the
~/cloudapi/
directory. -
Create a file named
body.json
and add the following contents to it:Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the
update_mask
parameter as an array ofpaths[]
strings.Format for listing settings
"update_mask": { "paths": [ "<setting_1>", "<setting_2>", ... "<setting_N>" ] }
{ "cluster_id": "<cluster_ID>" "update_mask": { "paths": [ "config.backup_window_start", "config.access.data_lens", "config.access.yandex_query", "maintenance_window", "deletion_protection", "config_spec.pool.mode", "config_spec.pool.size", "config_spec.pool.client_idle_timeout", "cloud_storage" ] }, "config": { "backup_window_start": { "hours": "<hours>", "minutes": "<minutes>", "seconds": "<seconds>", "nanos": "<nanoseconds>" }, "access": { "data_lens": <access_from_DataLens>, "yandex_query": <access_from_Yandex_Query> } }, "maintenance_window": { "weekly_maintenance_window": { "day": "<day_of_week>", "hour": "<hour>" } }, "deletion_protection": <cluster_deletion_protection>, "config_spec": { "pool": { "mode": "<operation_mode>", "size": "<number_of_client_connections>", "client_idle_timeout": "<client_timeout>" } }, "cloud_storage": { "enable": <hybrid_storage_use> } }
Where:
-
update_mask
: List of parameters to update as an array ofpaths[]
strings. -
config
: Cluster settings:-
backup_window_start
: Backup window settings.In this parameter, specify the backup start time:
hours
: Between0
and23
hours.minutes
: Between0
and59
minutes.seconds
: Between0
and59
seconds.nanos
: Between0
and999999999
nanoseconds.
-
access
: Cluster settings for access to the following Yandex Cloud services:data_lens
: Yandex DataLens,true
orfalse
.yandex_query
: Yandex Query,true
orfalse
.
-
-
maintenance_window
: Maintenance window settings (including for disabled clusters). Provide one of the two parameters:-
anytime
: Maintenance can take place at any time. -
weekly_maintenance_window
: Maintenance takes place once a week at the specified time:day
: Day of week inDDD
format:MON
,TUE
,WED
,THU
,FRI
,SAT
, orSUN
.hour
: Hour of day (UTC), from1
to24
.
-
-
deletion_protection
: Cluster deletion protection,true
orfalse
.Enabled deletion protection will not prevent a manual connection with the purpose to delete database contents.
-
config_spec.pool
: Connection pooler settings:mode
: Operation mode,SESSION
orTRANSACTION
.size
: Maximum number of client connections.client_idle_timeout
: Idle timeout for a client connection (in ms).
-
cloud_storage.enable
: Use of hybrid storage in clusters with Greenplum® 6.25 or higher. Set it totrue
to enable the Yandex Cloud Yezzey extension in a cluster. This extension is used to export AO and AOCO tables from disks within the Managed Service for Greenplum® cluster to a cold storage in Yandex Object Storage. This way, the data will be stored in a service bucket in a compressed and encrypted form. This is a more cost-efficient storage method.You cannot disable hybrid storage after you save your cluster settings.
Note
This feature is at the Preview stage and is free of charge.
You can get the cluster ID with a list of clusters in the folder.
-
-
Use the ClusterService.Update call and make a request, e.g., via gRPCurl
:grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/mdb/greenplum/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d @ \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.greenplum.v1.ClusterService.Update \ < body.json
-
View the server response to make sure the request was successful.
Editing the scheduled maintenance operations settings
You can edit your cluster's scheduled maintenance operations settings.
-
Go to the folder page and select Managed Service for Greenplum.
-
Select the cluster and click Edit in the top panel.
-
Under Managing background processes, change the parameters:
- Start time (UTC):
VACUUM
start time. The default value is19:00 UTC
. Once theVACUUM
operation is completed, theANALYZE
operation starts. - VACUUM timeout: Maximum
VACUUM
execution time, in seconds. Valid values: from7,200
to86,399
, with36,000
by default. As soon as this period expires,VACUUM
will be forced to terminate. - ANALYZE timeout: Maximum
ANALYZE
execution time, in seconds. Valid values: from7,200
to86,399
, with36,000
by default. As soon as this period expires, theANALYZE
operation will be forced to terminate.
The combined
VACUUM
andANALYZE
execution time may not exceed 24 hours. - Start time (UTC):
-
Click Save.
-
Get an IAM token for API authentication and put it into the environment variable:
export IAM_TOKEN="<IAM_token>"
-
Use the Cluster.Update method and make a request, e.g., via cURL
:Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the
updateMask
parameter as a single comma-separated string.curl \ --request PATCH \ --header "Authorization: Bearer $IAM_TOKEN" \ --header "Content-Type: application/json" \ --url 'https://mdb.api.cloud.yandex.net/managed-greenplum/v1/clusters/<cluster_ID>' \ --data '{ "updateMask": "configSpec.backgroundActivities.analyzeAndVacuum.start,configSpec.backgroundActivities.analyzeAndVacuum.analyzeTimeout,configSpec.backgroundActivities.analyzeAndVacuum.vacuumTimeout", "configSpec": { "backgroundActivities": { "analyzeAndVacuum": { "start": { "hours": "<operation_start_hour>", "minutes": "<operation_start_minute>" }, "analyzeTimeout": "<ANALYZE_operation_duration>", "vacuumTimeout": "<VACUUM_operation_duration>" } } } }'
Where:
-
updateMask
: List of parameters to update as a single string, separated by commas. -
configSpec.backgroundActivities.analyzeAndVacuum
: Background process management settings:start.hours
: Start hour of theVACUUM
operation in UTC. The values range from0
to23
, the default one is19
.start.minutes
: Start minute of theVACUUM
operation in UTC. The values range from0
to59
, the default one is0
.analyzeTimeout
: Maximum duration of theANALYZE
operation, in seconds. The values range from7200
to86399
, the default one is36000
. As soon as this period expires, theANALYZE
operation will be forced to terminate.vacuumTimeout
: Maximum duration of theVACUUM
operation, in seconds. The values range from7200
to86399
, the default one is36000
. As soon as this period expires, theVACUUM
operation will be forced to terminate.
You can get the cluster ID with a list of clusters in the folder.
-
-
View the server response to make sure the request was successful.
-
Get an IAM token for API authentication and put it into the environment variable:
export IAM_TOKEN="<IAM_token>"
-
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
Below, we assume the repository contents are stored in the
~/cloudapi/
directory. -
Use the ClusterService.Update call and make a request, e.g., via gRPCurl
:Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the
update_mask
parameter as an array ofpaths[]
strings.Format for listing settings
"update_mask": { "paths": [ "<setting_1>", "<setting_2>", ... "<setting_N>" ] }
grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/mdb/greenplum/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d '{ "cluster_id": "<cluster_ID>", "update_mask": { "paths": [ "config_spec.background_activities.analyze_and_vacuum.start", "config_spec.background_activities.analyze_and_vacuum.analyze_timeout", "config_spec.background_activities.analyze_and_vacuum.vacuumTimeout" ] }, "config_spec": { "background_activities": { "analyze_and_vacuum": { "start": { "hours": "<operation_start_hour>", "minutes": "<operation_start_minute>" }, "analyze_timeout": "<ANALYZE_operation_duration>", "vacuum_timeout": "<VACUUM_operation_duration>" } } } }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.greenplum.v1.ClusterService.Update
Where:
-
update_mask
: List of parameters to update as an array ofpaths[]
strings. -
config_spec.background_activities.analyze_and_vacuum
: Background process management settings:start.hours
: Start hour of theVACUUM
operation in UTC. The values range from0
to23
, the default one is19
.start.minutes
: Start minute of theVACUUM
operation in UTC. The values range from0
to59
, the default one is0
.analyze_timeout
: Maximum duration of theANALYZE
operation, in seconds. The values range from7200
to86399
, the default one is36000
. As soon as this period expires, theANALYZE
operation will be forced to terminate.vacuum_timeout
: Maximum duration of theVACUUM
operation, in seconds. The values range from7200
to86399
, the default one is36000
. As soon as this period expires, theVACUUM
operation will be forced to terminate.
You can get the cluster ID with a list of clusters in the folder.
-
-
View the server response to make sure the request was successful.
Changing Greenplum® settings
You can change the DBMS settings of the hosts in your cluster.
- Go to the folder page and select Managed Service for Greenplum.
- Select the cluster and click Edit in the top panel.
- Change the Greenplum® settings by clicking Settings under DBMS settings.
- Click Save.
- Click Save.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To change the Greenplum® DBMS settings:
-
View the full list of settings specified for the cluster:
yc managed-greenplum cluster get <cluster_name_or_ID>
-
View a description of the update cluster configuration CLI command:
yc managed-greenplum cluster update-config --help
-
Set the required parameter values:
All supported parameters are listed in the request format for the update method, in the
greenplumConfig_<Greenplum_version>
field. To specify a parameter name in the CLI call, convert its name fromlowerCamelCase
tosnake_case
. For example, convert themaxConnections
parameter from an API request tomax_connections
for the CLI command:yc managed-greenplum cluster update-config <cluster_name_or_ID> \ --set <parameter1_name>=<value1>,<parameter2_name>=<value2>,...
Managed Service for Greenplum® runs the update cluster settings operation.
-
Open the current Terraform configuration file with an infrastructure plan.
For more information about creating this file, see Creating clusters.
For a complete list of available Managed Service for Greenplum® cluster configuration fields, see the Terraform provider documentation
. -
In the cluster description, edit the Greenplum® settings under
greenplum_config
:resource "yandex_mdb_greenplum_cluster" "<cluster_name>" { ... greenplum_config = { max_connections = <maximum_number_of_connections> gp_workfile_compression = <true_or_false> ... } }
-
Make sure the settings are correct.
-
Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.
-
Run the command:
terraform validate
If there are errors in the configuration files, Terraform will point to them.
-
-
Confirm updating the resources.
-
Run the command to view planned changes:
terraform plan
If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.
-
If you are happy with the planned changes, apply them:
-
Run the command:
terraform apply
-
Confirm the update of resources.
-
Wait for the operation to complete.
-
Warning
The Terraform provider limits the amount of time for all Managed Service for Greenplum® cluster operations to complete to 120 minutes.
Operations exceeding the set timeout are interrupted.
How do I change these limits?
Add the
timeouts
block to the cluster description, for example:resource "yandex_mdb_greenplum_cluster" "<cluster name>" { ... timeouts { create = "1h30m" # 1 hour 30 minutes update = "2h" # 2 hours delete = "30m" # 30 minutes } }
-
-
Get an IAM token for API authentication and put it into the environment variable:
export IAM_TOKEN="<IAM_token>"
-
Use the Cluster.Update method and make a request, e.g., via cURL
:Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the
updateMask
parameter as a single comma-separated string.curl \ --request PATCH \ --header "Authorization: Bearer $IAM_TOKEN" \ --header "Content-Type: application/json" \ --url 'https://mdb.api.cloud.yandex.net/managed-greenplum/v1/clusters/<cluster_ID>' \ --data '{ "updateMask": "configSpec.greenplumConfig_<Greenplum®_version>.<setting_1>,...,configSpec.greenplumConfig_<Greenplum®_version>.<setting_N>", "configSpec": { "greenplumConfig_<Greenplum®_version>": { "<setting_1>": "<value_1>", "<setting_2>": "<value_2>", ... "<setting_N>": "<value_N>" } } }'
Where:
-
updateMask
: List of parameters to update as a single string, separated by commas.In this case, list all the Greenplum® settings to update.
-
configSpec.greenplumConfig_<PostgreSQL>
_version: Greenplum® settings. Use a separate line for each setting; separate them by commas.See the method description for the list of Greenplum® versions available for the parameter. See Cluster-level DBMS settings for a description and possible values for each setting.
You can get the cluster ID with a list of clusters in the folder.
-
-
View the server response to make sure the request was successful.
-
Get an IAM token for API authentication and put it into the environment variable:
export IAM_TOKEN="<IAM_token>"
-
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
Below, we assume the repository contents are stored in the
~/cloudapi/
directory. -
Use the ClusterService.Update call and make a request, e.g., via gRPCurl
:Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the
update_mask
parameter as an array ofpaths[]
strings.Format for listing settings
"update_mask": { "paths": [ "<setting_1>", "<setting_2>", ... "<setting_N>" ] }
grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/mdb/greenplum/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d '{ "cluster_id": "<cluster_ID>", "update_mask": { "paths": [ "config_spec.greenplum_config_<Greenplum®_version>.<setting_1>", "config_spec.greenplum_config_<Greenplum®_version>.<setting_2>", ... "config_spec.greenplum_config_<Greenplum®_version>.<setting_N>" ] }, "config_spec": { "greenplum_config_<Greenplum®_version>": { "<setting_1>": "<value_1>", "<setting_2>": "<value_2>", ... "<setting_N>": "<value_N>" } } }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.greenplum.v1.ClusterService.Update
Where:
-
update_mask
: List of parameters to update as an array ofpaths[]
strings.In this case, list all the Greenplum® settings to update.
-
config_spec.greenplum_config_<Greenplum®>
_version: Greenplum® settings. Use a separate line for each setting; separate them by commas.See the method description for the list of Greenplum® versions available for the parameter. See Greenplum® settings for a description and possible values for each setting.
You can get the cluster ID with a list of clusters in the folder.
-
-
View the server response to make sure the request was successful.
Changing the host class
You can change the host class for both master hosts and segment hosts. When changing the host class:
- The cluster's primary master host will change.
- Using a special FQDN does not guarantee a stable database connection: user sessions may be terminated.
We recommend changing the host class only when the cluster has no active workload.
- Go to the folder page and select Managed Service for Greenplum.
- Select a cluster and click
Edit in the top panel. - Under Host class, select the required class for Greenplum® master hosts or segment hosts.
- Click Save changes.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To change the host class for the cluster:
-
View the description of the update cluster CLI command:
yc managed-greenplum cluster update --help
-
Request a list of available classes (the
ZONE IDS
column lists the availability zones where you can select the appropriate class):-
For master hosts:
yc managed-greenplum resource-preset list master
-
For segment hosts:
yc managed-greenplum resource-preset list segment
+-------------+--------------------------------+--------------------------------+-------+----------+--------------------+---------------------+ | ID | ZONE IDS | DISK TYPES | CORES | MEMORY | HOST COUNT DIVIDER | MAX SEGMENT IN HOST | +-------------+--------------------------------+--------------------------------+-------+----------+--------------------+---------------------+ | i2.2xlarge | ru-central1-a, ru-central1-b | local-ssd, | 16 | 128.0 GB | 1 | 0 | | | | network-ssd-nonreplicated | | | | | | ... | +-------------+--------------------------------+--------------------------------+-------+----------+--------------------+---------------------+
-
-
Specify the required classes in the cluster update command:
yc managed-greenplum cluster update <cluster_name_or_ID> \ --master-config resource-id=<master_host_class_ID> \ --segment-config resource-id=<segment_host_class_ID>
Managed Service for Greenplum® will run the update host class command for the cluster.
-
Open the current Terraform configuration file with an infrastructure plan.
For more information about creating this file, see Creating clusters.
For a complete list of available Managed Service for Greenplum® cluster configuration fields, see the Terraform provider documentation
. -
In the Managed Service for Greenplum® cluster description, change the
resource_preset_id
attribute value undermaster_subcluster.resources
orsegment_subcluster.resources
:resource "yandex_mdb_greenplum_cluster" "<cluster_name>" { ... master_subcluster { resources { resource_preset_id = "<host_class>" ... } } segment_subcluster { resources { resource_preset_id = "<host_class>" ... } } }
-
Make sure the settings are correct.
-
Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.
-
Run the command:
terraform validate
If there are errors in the configuration files, Terraform will point to them.
-
-
Confirm updating the resources.
-
Run the command to view planned changes:
terraform plan
If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.
-
If you are happy with the planned changes, apply them:
-
Run the command:
terraform apply
-
Confirm the update of resources.
-
Wait for the operation to complete.
-
Warning
The Terraform provider limits the amount of time for all Managed Service for Greenplum® cluster operations to complete to 120 minutes.
Operations exceeding the set timeout are interrupted.
How do I change these limits?
Add the
timeouts
block to the cluster description, for example:resource "yandex_mdb_greenplum_cluster" "<cluster name>" { ... timeouts { create = "1h30m" # 1 hour 30 minutes update = "2h" # 2 hours delete = "30m" # 30 minutes } }
-
-
Get an IAM token for API authentication and put it into the environment variable:
export IAM_TOKEN="<IAM_token>"
-
Use the Cluster.Update method and make a request, e.g., via cURL
:Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the
updateMask
parameter as a single comma-separated string.curl \ --request PATCH \ --header "Authorization: Bearer $IAM_TOKEN" \ --header "Content-Type: application/json" \ --url 'https://mdb.api.cloud.yandex.net/managed-greenplum/v1/clusters/<cluster_ID>' \ --data '{ "updateMask": "masterConfig.resources.resourcePresetId,segmentConfig.resources.resourcePresetId", "masterConfig": { "resources": { "resourcePresetId": "<host_class>" } }, "segmentConfig": { "resources": { "resourcePresetId": "<host_class>" } } }'
Where:
-
updateMask
: List of parameters to update as a single string, separated by commas. -
masterConfig.resources.resourcePresetId
andsegmentConfig.resources.resourcePresetId
: New host class for master and segment hosts.
You can get the cluster ID with a list of clusters in the folder.
-
-
View the server response to make sure the request was successful.
-
Get an IAM token for API authentication and put it into the environment variable:
export IAM_TOKEN="<IAM_token>"
-
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
Below, we assume the repository contents are stored in the
~/cloudapi/
directory. -
Use the ClusterService.Update call and make a request, e.g., via gRPCurl
:Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the
update_mask
parameter as an array ofpaths[]
strings.Format for listing settings
"update_mask": { "paths": [ "<setting_1>", "<setting_2>", ... "<setting_N>" ] }
grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/mdb/greenplum/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d '{ "cluster_id": "<cluster_ID>", "update_mask": { "paths": [ "master_config.resources.resource_preset_id", "segment_config.resources.resource_preset_id" ] }, "master_config": { "resources": { "resource_preset_id": "<host_class>" } }, "segment_config": { "resources": { "resource_preset_id": "<host_class>" } } }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.greenplum.v1.ClusterService.Update
Where:
-
update_mask
: List of parameters to update as an array ofpaths[]
strings. -
master_config.resources.resource_preset_id
andsegment_config.resources.resource_preset_id
: New host class for master and segment hosts.
You can get the cluster ID with a list of clusters in the folder.
-
-
View the server response to make sure the request was successful.
Increasing storage size
Make sure the cloud has enough quota to increase the storage size. Open the cloud's Quotas
To increase the cluster storage size:
- In the management console
, select the folder with the cluster you need. - Select Managed Service for Greenplum.
- Select the cluster you need.
- At the top of the page, click Edit.
- Edit the settings in the Storage section.
- Click Save.
-
Open the current Terraform configuration file with an infrastructure plan.
For more information about creating this file, see Creating clusters.
For a complete list of available Managed Service for Greenplum® cluster configuration fields, see the Terraform provider documentation
. -
In the Managed Service for Greenplum® cluster description, change the
disk_size
attribute value undermaster_subcluster.resources
orsegment_subcluster.resources
:resource "yandex_mdb_greenplum_cluster" "<cluster_name>" { ... master_subcluster { resources { disk_size = <storage_size_in_GB> ... } } segment_subcluster { resources { disk_size = <storage_size_in_GB> ... } } }
-
Make sure the settings are correct.
-
Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.
-
Run the command:
terraform validate
If there are errors in the configuration files, Terraform will point to them.
-
-
Confirm updating the resources.
-
Run the command to view planned changes:
terraform plan
If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.
-
If you are happy with the planned changes, apply them:
-
Run the command:
terraform apply
-
Confirm the update of resources.
-
Wait for the operation to complete.
-
Warning
The Terraform provider limits the amount of time for all Managed Service for Greenplum® cluster operations to complete to 120 minutes.
Operations exceeding the set timeout are interrupted.
How do I change these limits?
Add the
timeouts
block to the cluster description, for example:resource "yandex_mdb_greenplum_cluster" "<cluster name>" { ... timeouts { create = "1h30m" # 1 hour 30 minutes update = "2h" # 2 hours delete = "30m" # 30 minutes } }
-
-
Get an IAM token for API authentication and put it into the environment variable:
export IAM_TOKEN="<IAM_token>"
-
Use the Cluster.Update method and make a request, e.g., via cURL
:Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the
updateMask
parameter as a single comma-separated string.curl \ --request PATCH \ --header "Authorization: Bearer $IAM_TOKEN" \ --header "Content-Type: application/json" \ --url 'https://mdb.api.cloud.yandex.net/managed-greenplum/v1/clusters/<cluster_ID>' \ --data '{ "updateMask": "masterConfig.resources.diskSize,segmentConfig.resources.diskSize", "masterConfig": { "resources": { "diskSize": "<storage_size_in_bytes>" } }, "segmentConfig": { "resources": { "diskSize": "<storage_size_in_bytes>" } } }'
Where:
-
updateMask
: List of parameters to update as a single string, separated by commas. -
masterConfig.resources.diskSize
andsegmentConfig.resources.diskSize
: New disk size in bytes for master and segment hosts.
You can get the cluster ID with a list of clusters in the folder.
-
-
View the server response to make sure the request was successful.
-
Get an IAM token for API authentication and put it into the environment variable:
export IAM_TOKEN="<IAM_token>"
-
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapi
Below, we assume the repository contents are stored in the
~/cloudapi/
directory. -
Use the ClusterService.Update call and make a request, e.g., via gRPCurl
:Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the
update_mask
parameter as an array ofpaths[]
strings.Format for listing settings
"update_mask": { "paths": [ "<setting_1>", "<setting_2>", ... "<setting_N>" ] }
grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/mdb/greenplum/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d '{ "cluster_id": "<cluster_ID>", "update_mask": { "paths": [ "master_config.resources.disk_size", "segment_config.resources.disk_size" ] }, "master_config": { "resources": { "disk_size": "<storage_size_in_bytes>" } }, "segment_config": { "resources": { "disk_size": "<storage_size_in_bytes>" } } }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.greenplum.v1.ClusterService.Update
Where:
-
update_mask
: List of parameters to update as an array ofpaths[]
strings. -
master_config.resources.disk_size
andsegment_config.resources.disk_size
: New disk size in bytes for master and segment hosts.
You can get the cluster ID with a list of clusters in the folder.
-
-
View the server response to make sure the request was successful.
Greenplum® and Greenplum Database® are registered trademarks or trademarks of VMware, Inc. in the United States and/or other countries.