Updating Greenplum® cluster settings
- Changing the cluster name and description
- Change the public access setting
- Changing additional cluster settings
- Changing the scheduled maintenance operations settings
- Updating Greenplum® settings
- Changing the host class
- Changing the disk type and increasing the storage size
- Changing service account settings
- Changing logging settings
After creating a cluster, you can:
- Change the cluster name and description.
- Change the public access setting.
- Change additional cluster settings.
- Change the scheduled maintenance operation settings.
- Change Greenplum® settings as per the Greenplum® guide.
- Change the PXF protocol settings to optimize external data operations.
- Change the authentication settings in the pg_hba.conf file.
- Change the service account settings.
- Change the logging settings.
Changing the cluster name and description
- Open the folder dashboard
. - Navigate to the Yandex MPP Analytics for PostgreSQL service.
- Select your 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 CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
To change the name and description of a Greenplum® cluster:
-
View the current
nameanddescriptionof the cluster:yc managed-greenplum cluster get <cluster_name_or_ID> -
See the description of the CLI command for updating a cluster configuration:
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 that defines your infrastructure.
For more information about creating this file, see Creating clusters.
For a complete list of adjustable configuration fields for a Greenplum® cluster, see the Terraform provider guide.
-
In the Greenplum® cluster description, change the
descriptionattribute value:resource "yandex_mdb_greenplum_cluster" "<cluster_name>" { name = "<cluster_name>" description = "<new_cluster_description>" ... } -
Make sure the settings are correct.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validateTerraform will show any errors found in your configuration files.
-
-
Confirm updating the resources.
-
Run this command to view the planned changes:
terraform planIf you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply -
Confirm updating the resources.
-
Wait for the operation to complete.
-
Warning
The Terraform provider limits the amount of time for all Yandex MPP Analytics for PostgreSQL cluster operations to complete to 120 minutes.
Operations exceeding the set timeout are interrupted.
How do I change these limits?
Add the
timeoutsblock 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 in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Use the Cluster.Update method and send the following 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
updateMaskparameter 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
updateMaskis the list of parameters to update as a single string, separated by commas.You can get the cluster ID with the list of clusters in the folder.
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and put it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Use the ClusterService.Update call and send the following 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_maskparameter 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.UpdateWhere
update_maskis the list of parameters to update as an array of strings (paths[]).You can get the cluster ID with the list of clusters in the folder.
-
View the server response to make sure your request was successful.
Change the public access setting
- Open the folder dashboard
. - Navigate to the Yandex MPP Analytics for PostgreSQL service.
- Select your 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 CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
To change the public access setting Greenplum®:
-
See the description of the CLI command for updating a cluster configuration:
yc managed-greenplum cluster update --help -
Configure public access in the
--assign-public-ipparameter:yc managed-greenplum cluster update <cluster_name_or_ID> \ --assign-public-ip=<enable_public_access_to_cluster>Where
assign-public-ipis public access to the cluster,trueorfalse.
-
Get an IAM token for API authentication and put it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Use the Cluster.Update method and send the following 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
updateMaskparameter 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": <allow_public_access_to_cluster_hosts> } }'Where:
-
updateMask: Comma-separated string of settings you want to update.Here, we provide only one setting.
-
assignPublicIp: Public access to cluster hosts,trueorfalse.
You can get the cluster ID with the list of clusters in the folder.
-
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and put it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Use the ClusterService.Update call and send the following 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_maskparameter 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": <allow_public_access_to_cluster_hosts> } }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.greenplum.v1.ClusterService.UpdateWhere:
-
update_mask: List of parameters to update as an array of strings (paths[]).Here, we provide only one setting.
-
assign_public_ip: Public access to cluster hosts,trueorfalse.
You can get the cluster ID with the list of clusters in the folder.
-
-
View the server response to make sure your 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 a while to enable public access.
Changing additional cluster settings
-
Open the folder dashboard
. -
Navigate to the Yandex MPP Analytics for PostgreSQL service.
-
Select your 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:00UTC. -
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 Yandex MPP Analytics for PostgreSQL.
-
WebSQL access: This option allows sending queries to cluster databases using Yandex WebSQL.
-
Deletion protection: Manages cluster protection against accidental deletion.
Even with deletion protection enabled, one can still connect to the cluster manually and delete the data.
-
Hybrid storage: Enables hybrid storage.
You cannot disable hybrid storage after you save your cluster settings.
When hybrid storage is enabled, you can use the Yezzey extension to move part of your AO and AOCO tables from the cluster storage to a cold storage, and vice versa.
Cold storage is a convenient option if you need to store your table data for a long time without using it much. This will make data storage less costly.
Note
This feature is at the Preview stage and is free of charge.
-
Connection pooler: Operation mode and connection pooler settings:
- Mode:
SESSION(session mode) orTRANSACTION(transaction mode, default). - Size: Maximum number of client connections. The default value is
0(not limited). - Client Idle Timeout: Idle timeout for a client connection (in seconds). Default:
28800.
- Mode:
-
-
Click Save.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
To change additional cluster settings:
-
View the description of the CLI command for updating a cluster:
yc managed-greenplum cluster update --help -
Run the following command with the list of settings you want to update:
yc managed-greenplum cluster update <cluster_name_or_ID> \ --backup-window-start <backup_start_time> \ --datalens-access=<allow_access_from_DataLens> \ --yandexquery-access=<allow_access_from_Yandex_Query> \ --maintenance-window type=<maintenance_type>,` `day=<day_of_week>,` `hour=<hour> \ --websql-access=<allow_access_from_WebSQL> \ --deletion-protection
You can update 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,trueorfalse. -
--yandexquery-access: Access to the cluster from Yandex Query,trueorfalse. -
--websql-access: Enables SQL queries against cluster databases from the Yandex Cloud management console using Yandex WebSQL. The default value isfalse. -
--maintenance-window: Maintenance window settings (including for stopped clusters), wheretypeis the maintenance type:anytime: At any time (default).weekly: On a schedule. For this value, also specify the following:day: Day of week, i.e.,MON,TUE,WED,THU,FRI,SAT, orSUN.hour: Hour of day (UTC), from1to24.
-
--deletion-protection: Cluster protection from accidental deletion,trueorfalse.Even with deletion protection enabled, one can still connect to the cluster manually and delete the data.
You can get the cluster name with the list of clusters in the folder.
-
Open the current Terraform configuration file that defines your infrastructure.
For more information about creating this file, see Creating clusters.
For a complete list of adjustable configuration fields for a Greenplum® cluster, see the Terraform provider guide.
-
In the Greenplum® cluster description, change the values of additional settings as required:
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 = <allow_access_from_DataLens> yandex_query = <allow_access_from_Yandex_Query> } deletion_protection = <protect_cluster_from_deletion> cloud_storage { enable = <use_hybrid_storage> } pooler_config { pooling_mode = <operation_mode> pool_size = <size> pool_client_idle_timeout = <client_timeout> } }You can update the following settings:
-
backup_window_start.hours: Start of the period for initiating cluster backup. It is set in UTC inHHformat: from0to23. -
maintenance_window: Maintenance window settings (including for disabled clusters):type: Maintenance type. The possible values include:ANYTIME: Any time.WEEKLY: On a schedule.
day: Day of week inDDDformat for theWEEKLYtype, e.g.,MON.hour: Time of day (UTC) inHHformat for theWEEKLYtype, e.g.,21.
-
access.data_lens: Access to the cluster from Yandex DataLens,trueorfalse. -
access.yandex_query: Access to the cluster from Yandex Query,trueorfalse. -
deletion_protection: Cluster deletion protection,trueorfalse.Even with deletion protection enabled, one can still connect to the cluster manually and delete the data.
-
cloud_storage.enable: Use of hybrid storage.Set to
trueto enable hybrid storage. You cannot disable hybrid storage after you save your cluster settings.When hybrid storage is enabled, you can use the Yezzey extension to move part of your AO and AOCO tables from the cluster storage to a cold storage, and vice versa.
Cold storage is a convenient option if you need to store your table data for a long time without using it much. This will make data storage less costly.
Note
This feature is at the Preview stage and is free of charge.
-
pooler_config: Connection pooler settings:pooling_mode: Operation mode,SESSIONorTRANSACTION.pool_size: Maximum number of client connections.pool_client_idle_timeout: Idle timeout for a client connection (in seconds).
-
-
Make sure the settings are correct.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validateTerraform will show any errors found in your configuration files.
-
-
Confirm updating the resources.
-
Run this command to view the planned changes:
terraform planIf you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply -
Confirm updating the resources.
-
Wait for the operation to complete.
-
Warning
The Terraform provider limits the amount of time for all Yandex MPP Analytics for PostgreSQL cluster operations to complete to 120 minutes.
Operations exceeding the set timeout are interrupted.
How do I change these limits?
Add the
timeoutsblock 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 in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Create a file named
body.jsonand paste the following code into 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
updateMaskparameter 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": <allow_access_from_DataLens>, "yandexQuery": <allow_access_from_Yandex_Query> } }, "maintenanceWindow": { "weeklyMaintenanceWindow": { "day": "<day_of_week>", "hour": "<hour>" } }, "deletionProtection": <protect_cluster_from_deletion>, "configSpec": { "pool": { "mode": "<operation_mode>", "size": "<number_of_client_connections>", "clientIdleTimeout": "<client_timeout>" } }, "cloudStorage": { "enable": <use_hybrid_storage> } }Where:
-
updateMask: Comma-separated string of settings you want to update. -
config: Cluster settings:-
backupWindowStart: Backup window settings.In this parameter, specify the backup start time:
hours: Between0and23hours.minutes: Between0and59minutes.seconds: Between0and59seconds.nanos: Between0and999999999nanoseconds.
-
access: Cluster access settings for the following Yandex Cloud services:dataLens: Yandex DataLens,trueorfalse.yandexQuery: Yandex Query,trueorfalse.
-
-
maintenanceWindow: Maintenance window settings, including for stopped clusters. Provide one of these two parameters:-
anytime: Maintenance takes place at any time. -
weeklyMaintenanceWindow: Maintenance takes place once a week at the specified time:day: Day of week inDDDformat, i.e.,MON,TUE,WED,THU,FRI,SAT, orSUN.hour: Time of day (UTC), from1to24.
-
-
deletionProtection: Cluster deletion protection,trueorfalse.Even with deletion protection enabled, one can still connect to the cluster manually and delete the data.
-
configSpec.pool: Connection pooler settings:mode: Operation mode,SESSIONorTRANSACTION.size: Maximum number of client connections.clientIdleTimeout: Idle timeout for a client connection (in seconds).
-
cloudStorage.enable: Use of hybrid storage in clusters with Greenplum® 6.25 or higher. Set it totrueto enable the Yandex Cloud Yezzey extension in a cluster. This extension is used to export AO and AOCO tables from disks within the Greenplum® cluster to a cold storage in Yandex Object Storage. This way, the data will be stored in a service bucket compressed and encrypted. 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.
-
-
Call the Cluster.Update method, e.g., via the following cURL
request: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 the list of clusters in the folder.
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and put it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Create a file named
body.jsonand paste the following code into 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_maskparameter 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": <allow_access_from_DataLens>, "yandex_query": <allow_access_from_Yandex_Query> } }, "maintenance_window": { "weekly_maintenance_window": { "day": "<day_of_week>", "hour": "<hour>" } }, "deletion_protection": <protect_cluster_from_deletion>, "config_spec": { "pool": { "mode": "<operation_mode>", "size": "<number_of_client_connections>", "client_idle_timeout": "<client_timeout>" } }, "cloud_storage": { "enable": <use_hybrid_storage> } }Where:
-
update_mask: List of parameters to update as an array of strings (paths[]). -
config: Cluster settings:-
backup_window_start: Backup window settings.In this parameter, specify the backup start time:
hours: Between0and23hours.minutes: Between0and59minutes.seconds: Between0and59seconds.nanos: Between0and999999999nanoseconds.
-
access: Cluster access settings for the following Yandex Cloud services:data_lens: Yandex DataLens,trueorfalse.yandex_query: Yandex Query,trueorfalse.
-
-
maintenance_window: Maintenance window settings, including for stopped clusters. Provide one of these two parameters:-
anytime: Maintenance takes place at any time. -
weekly_maintenance_window: Maintenance takes place once a week at the specified time:day: Day of week inDDDformat, i.e.,MON,TUE,WED,THU,FRI,SAT, orSUN.hour: Time of day (UTC), from1to24.
-
-
deletion_protection: Cluster deletion protection,trueorfalse.Even with deletion protection enabled, one can still connect to the cluster manually and delete the data.
-
config_spec.pool: Connection pooler settings:mode: Operation mode,SESSIONorTRANSACTION.size: Maximum number of client connections.client_idle_timeout: Idle timeout for a client connection (in seconds).
-
cloud_storage.enable: Use of hybrid storage in clusters with Greenplum® 6.25 or higher. Set it totrueto enable the Yandex Cloud Yezzey extension in a cluster. This extension is used to export AO and AOCO tables from disks within the Greenplum® cluster to a cold storage in Yandex Object Storage. This way, the data will be stored in a service bucket compressed and encrypted. 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 the list of clusters in the folder.
-
-
Call the ClusterService.Update method, e.g., via the following gRPCurl
request: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 -
Check the server response to make sure your request was successful.
Changing the scheduled maintenance operations settings
You can change your cluster's scheduled maintenance operations settings.
-
Open the folder dashboard
. -
Navigate to the Yandex MPP Analytics for PostgreSQL service.
-
Select your cluster and click Edit in the top panel.
-
Under Managing background processes, change these parameters:
- Start time (UTC):
VACUUMstart time. The default value is19:00 UTC. Once theVACUUMoperation is completed, theANALYZEoperation starts. - VACUUM timeout: Maximum
VACUUMexecution time, in seconds. Valid values: from7,200to86,399, with36,000by default. As soon as this period expires,VACUUMwill be forced to terminate. - ANALYZE timeout: Maximum
ANALYZEexecution time, in seconds. Valid values: from7,200to86,399, with36,000by default. As soon as this period expires, theANALYZEoperation will be forced to terminate.
The combined
VACUUMandANALYZEexecution time may not exceed 24 hours. - Start time (UTC):
-
Click Save.
-
Get an IAM token for API authentication and put it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Use the Cluster.Update method and send the following 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
updateMaskparameter 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: Comma-separated string of settings you want to update. -
configSpec.backgroundActivities.analyzeAndVacuum: Background process management settings:start.hours: Start hour of theVACUUMoperation in UTC. The values range from0to23, the default one is19.start.minutes: Start minute of theVACUUMoperation in UTC. The values range from0to59, the default one is0.analyzeTimeout: Maximum duration of theANALYZEoperation, in seconds. The values range from7200to86399, the default one is36000. As soon as this period expires, theANALYZEoperation will be forced to terminate.vacuumTimeout: Maximum duration of theVACUUMoperation, in seconds. The values range from7200to86399, the default one is36000. As soon as this period expires, theVACUUMoperation will be forced to terminate.
You can get the cluster ID with the list of clusters in the folder.
-
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and put it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Use the ClusterService.Update call and send the following 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_maskparameter 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.UpdateWhere:
-
update_mask: List of parameters to update as an array of strings (paths[]). -
config_spec.background_activities.analyze_and_vacuum: Background process management settings:start.hours: Start hour of theVACUUMoperation in UTC. The values range from0to23, the default one is19.start.minutes: Start minute of theVACUUMoperation in UTC. The values range from0to59, the default one is0.analyze_timeout: Maximum duration of theANALYZEoperation, in seconds. The values range from7200to86399, the default one is36000. As soon as this period expires, theANALYZEoperation will be forced to terminate.vacuum_timeout: Maximum duration of theVACUUMoperation, in seconds. The values range from7200to86399, the default one is36000. As soon as this period expires, theVACUUMoperation will be forced to terminate.
You can get the cluster ID with the list of clusters in the folder.
-
-
Check the server response to make sure your request was successful.
Updating Greenplum® settings
You can change the global DBMS settings of your cluster. For a list of settings available for editing, see Greenplum® settings.
Note
To update user-level settings, including those not managed by Yandex MPP Analytics for PostgreSQL at the cluster level, use the following command:
ALTER ROLE <role_name> SET <setting> = <value>;
To update settings at the individual database level, use the following command:
ALTER DATABASE <DB_name> SET <setting> = <value>;
For a full list of settings, see the Greenplum® documentation
- Open the folder dashboard
. - Navigate to the Yandex MPP Analytics for PostgreSQL service.
- Select your 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 CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
To change the Greenplum® DBMS settings:
-
View the full list of cluster settings:
yc managed-greenplum cluster get <cluster_name_or_ID> -
See the description of the CLI command for updating a cluster configuration:
yc managed-greenplum cluster update-config --help -
Set the parameter values as needed:
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 themaxConnectionsparameter from an API request tomax_connectionsfor the CLI command:yc managed-greenplum cluster update-config <cluster_name_or_ID> \ --set <parameter1_name>=<value1>,<parameter2_name>=<value2>,...Yandex MPP Analytics for PostgreSQL will start updating the cluster settings.
-
Open the current Terraform configuration file that defines your infrastructure.
For more information about creating this file, see Creating clusters.
For a complete list of adjustable configuration fields for a Greenplum® cluster, see the Terraform provider guide.
-
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.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validateTerraform will show any errors found in your configuration files.
-
-
Confirm updating the resources.
-
Run this command to view the planned changes:
terraform planIf you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply -
Confirm updating the resources.
-
Wait for the operation to complete.
-
Warning
The Terraform provider limits the amount of time for all Yandex MPP Analytics for PostgreSQL cluster operations to complete to 120 minutes.
Operations exceeding the set timeout are interrupted.
How do I change these limits?
Add the
timeoutsblock 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 in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Use the Cluster.Update method and send the following 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
updateMaskparameter 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: Comma-separated string of settings you want to update.List all Greenplum® settings you want to update.
-
configSpec.greenplumConfig_<Greenplum®_version>: Greenplum® settings. Specify each setting on a new line, separated by commas.See the method description for the list of Greenplum® versions supporting this option. See Cluster-level DBMS settings for the descriptions and possible values of the settings.
You can get the cluster ID with the list of clusters in the folder.
-
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and put it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Use the ClusterService.Update call and send the following 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_maskparameter 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.UpdateWhere:
-
update_mask: List of parameters to update as an array of strings (paths[]).List all Greenplum® settings you want to update.
-
config_spec.greenplum_config_<Greenplum®_version>: Greenplum® settings. Specify each setting on a new line, separated by commas.See the method description for the list of Greenplum® versions supporting this option. See Greenplum® settings for the descriptions and possible values of the settings.
You can get the cluster ID with the list of clusters in the folder.
-
-
Check the server response to make sure your request was successful.
Changing the host class
You can change the host class for both master 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.
Changing the segment host class affects the maximum amount of memory allocated to each Greenplum® server process.
We recommend changing the host class only when your cluster has no active workload.
- Open the folder dashboard
. - Navigate to the Yandex MPP Analytics for PostgreSQL service.
- Select your cluster and click
Edit in the top panel. - Under Host class, select the relevant class for Greenplum® master hosts or segment hosts.
- Click Save changes.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
To change the host class for a cluster:
-
View the description of the CLI command for updating a cluster:
yc managed-greenplum cluster update --help -
Get the list of available host classes. The
ZONE IDScolumn 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 relevant 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>Yandex MPP Analytics for PostgreSQL will start updating the host class for your cluster.
-
Open the current Terraform configuration file that defines your infrastructure.
For more information about creating this file, see Creating clusters.
For a complete list of adjustable configuration fields for a Greenplum® cluster, see the Terraform provider guide.
-
In the Greenplum® cluster description, edit the value of the
resource_preset_idattribute undermaster_subcluster.resourcesorsegment_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.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validateTerraform will show any errors found in your configuration files.
-
-
Confirm updating the resources.
-
Run this command to view the planned changes:
terraform planIf you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply -
Confirm updating the resources.
-
Wait for the operation to complete.
-
Warning
The Terraform provider limits the amount of time for all Yandex MPP Analytics for PostgreSQL cluster operations to complete to 120 minutes.
Operations exceeding the set timeout are interrupted.
How do I change these limits?
Add the
timeoutsblock 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 in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Use the Cluster.Update method and send the following 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
updateMaskparameter 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: Comma-separated string of settings you want to update. -
masterConfig.resources.resourcePresetIdandsegmentConfig.resources.resourcePresetId: New host class for master and segment hosts.
You can get the cluster ID with the list of clusters in the folder.
-
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and put it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Use the ClusterService.Update call and send the following 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_maskparameter 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.UpdateWhere:
-
update_mask: List of parameters to update as an array of strings (paths[]). -
master_config.resources.resource_preset_idandsegment_config.resources.resource_preset_id: New host class for master and segment hosts.
You can get the cluster ID with the list of clusters in the folder.
-
-
Check the server response to make sure your request was successful.
Changing the disk type and increasing the storage size
Make sure the cloud has enough quota to increase the storage size. Open the cloud's Quotas
To change the disk type and increase the storage size for a cluster:
-
In the management console
, select the folder with the cluster of interest. -
Navigate to the Yandex MPP Analytics for PostgreSQL service.
-
Select your cluster.
-
At the top of the page, click Edit.
-
Under Storage:
- Select the disk type.
- Specify the required disk size.
-
Click Save.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
To increase your cluster storage size:
-
View the description of the CLI command for updating a cluster:
yc managed-greenplum cluster update --help -
Specify the required storage size for master or segment hosts in the cluster update command (at least as large as
disk_sizein the cluster properties):yc managed-mysql cluster update <cluster_name_or_ID> \ --master-config disk-size <storage_size_in_GB> \ --segment-config disk-size <storage_size_in_GB>
-
Open the current Terraform configuration file that defines your infrastructure.
For more information about creating this file, see Creating clusters.
For a complete list of adjustable configuration fields for a Greenplum® cluster, see the Terraform provider guide.
-
In the Greenplum® cluster description, edit the values of the
disk_type_idanddisk_sizeattributes undermaster_subcluster.resourcesorsegment_subcluster.resources:resource "yandex_mdb_greenplum_cluster" "<cluster_name>" { ... master_subcluster { resources { disk_type_id = "<disk_type>" disk_size = <storage_size_in_GB> ... } } segment_subcluster { resources { disk_type_id = "<disk_type>" disk_size = <storage_size_in_GB> ... } } } -
Make sure the settings are correct.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validateTerraform will show any errors found in your configuration files.
-
-
Confirm updating the resources.
-
Run this command to view the planned changes:
terraform planIf you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply -
Confirm updating the resources.
-
Wait for the operation to complete.
-
Warning
The Terraform provider limits the amount of time for all Yandex MPP Analytics for PostgreSQL cluster operations to complete to 120 minutes.
Operations exceeding the set timeout are interrupted.
How do I change these limits?
Add the
timeoutsblock 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 in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Use the Cluster.Update method and send the following 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
updateMaskparameter 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.diskTypeId,masterConfig.resources.diskSize,segmentConfig.resources.diskTypeId,segmentConfig.resources.diskSize", "masterConfig": { "resources": { "diskTypeId": "<disk_type>", "diskSize": "<storage_size_in_bytes>" } }, "segmentConfig": { "resources": { "diskTypeId": "<disk_type>", "diskSize": "<storage_size_in_bytes>" } } }'Where:
-
updateMask: Comma-separated string of settings you want to update. -
masterConfig.resources,segmentConfig.resources: Storage properties for master hosts and segment hosts:diskTypeId: Disk type.diskSize: New storage size, in bytes.
You can get the cluster ID with the list of clusters in the folder.
-
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and put it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Use the ClusterService.Update call and send the following 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_maskparameter 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_type_id", "master_config.resources.disk_size", "segment_config.resources.disk_type_id", "segment_config.resources.disk_size" ] }, "master_config": { "resources": { "disk_type_id": "<disk_type>", "disk_size": "<storage_size_in_bytes>" } }, "segment_config": { "resources": { "disk_type_id": "<disk_type>", "disk_size": "<storage_size_in_bytes>" } } }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.greenplum.v1.ClusterService.UpdateWhere:
-
update_mask: List of parameters to update as an array of strings (paths[]). -
master_config.resources,segment_config.resources: Storage properties for master hosts and segment hosts:disk_type_id: Disk type.disk_size: New storage size, in bytes.
You can get the cluster ID with the list of clusters in the folder.
-
-
Check the server response to make sure your request was successful.
Changing service account settings
- In the management console
, select the folder with the cluster of interest. - Navigate to the Yandex MPP Analytics for PostgreSQL service.
- Select your cluster.
- At the top of the page, click Edit.
- In the Service account field, select a service account from the list or create a new one.
- Click Save.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
To change the ID of the cluster service account:
-
See the description of the CLI command for updating a cluster configuration:
yc managed-greenplum cluster update --help -
Specify the service account ID:
yc managed-greenplum cluster update <cluster_name_or_ID> \ --service-account <service_account_ID>
-
Open the current Terraform configuration file that defines your infrastructure.
For more information about creating this file, see Creating clusters.
For a complete list of adjustable configuration fields for a Greenplum® cluster, see the Terraform provider guide.
-
In the Greenplum® cluster description, change the
service_account_idattribute value:resource "yandex_mdb_greenplum_cluster" "<cluster_name>" { service_account_id = "<service_account_ID>" ... } -
Make sure the settings are correct.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validateTerraform will show any errors found in your configuration files.
-
-
Confirm updating the resources.
-
Run this command to view the planned changes:
terraform planIf you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply -
Confirm updating the resources.
-
Wait for the operation to complete.
-
Warning
The Terraform provider limits the amount of time for all Yandex MPP Analytics for PostgreSQL cluster operations to complete to 120 minutes.
Operations exceeding the set timeout are interrupted.
How do I change these limits?
Add the
timeoutsblock 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 in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Use the Cluster.Update method and send the following 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
updateMaskparameter 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": "serviceAccountId", "serviceAccountId": "<service_account_ID>" }'Where:
-
updateMask: Comma-separated string of settings you want to update.Here, we provide only one setting.
-
serviceAccountId: Service account ID.
You can get the cluster ID with the list of clusters in the folder.
-
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and put it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Use the ClusterService.Update call and send the following 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_maskparameter 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": [ "service_account_id" ] }, "service_account_id": "<service_account_ID>" }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.greenplum.v1.ClusterService.UpdateWhere:
-
update_mask: List of settings you want to update as an array of strings (paths[]).Here, we provide only one setting.
-
service_account_id: Service account ID.
You can get the cluster ID with the list of clusters in the folder.
-
-
Check the server response to make sure your request was successful.
Changing logging settings
You can change the settings for transferring cluster logs to Yandex Cloud Logging.
-
In the management console
, select the folder with the cluster of interest. -
Navigate to the Yandex MPP Analytics for PostgreSQL service.
-
Select your cluster.
-
At the top of the page, click Edit.
-
Under Advanced settings, enable or disable logging using the Write logs option. If you turn logging on, configure it:
-
Specify logging destination:
- Folder: Log to the default log group for the selected folder.
- Group: Log either to a new log group or one selected from the list.
-
Select the logs you need:
- Command Center logs: Enables Command Center logs.
- Greenplum logs: Enables Greenplum® logs.
-
-
Click Save.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
To change logging settings:
-
See the description of the CLI command for updating a cluster configuration:
yc managed-greenplum cluster update --help -
Specify the logging settings to update in the update cluster command:
yc managed-greenplum cluster update <cluster_name_or_ID> \ --log-enabled \ --log-command-center-enabled \ --log-greenplum-enabled \ --log-pooler-enabled \ --log-folder-id <folder_ID>Where:
-
--log-enabled: Enables log transfer. Required for other flags responsible for transferring specific logs, e.g.,--log-greenplum-enabled. -
--log-command-center-enabled: Transferring Command Center logs. -
--log-greenplum-enabled: Transferring Greenplum® logs. -
--log-pooler-enabled: Transferring connection pooler logs. -
--log-folder-id: Specify the ID of the folder whose log group you want to use. -
--log-group-id: ID of the log group to write logs to.Specify either
--log-folder-idor--log-group-id.
-
-
Open the current Terraform configuration file that defines your infrastructure.
For more information about creating this file, see Creating clusters.
For a complete list of adjustable configuration fields for a Greenplum® cluster, see the Terraform provider guide.
-
In the Greenplum® cluster description, update the attribute values in the
loggingsection:resource "yandex_mdb_greenplum_cluster" "<cluster_name>" { ... logging { enabled = <enable_transferring_logs> command_center_enabled = <transfer_Yandex_Command_Center_logs> greenplum_enabled = <transfer_Greenplum®_logs> pooler_enabled = <transfer_connection_pooler_logs> folder_id = "<folder_ID>" } }Where:
-
enabled: Manages log transfer,trueorfalse. To enable parameters responsible for transferring specific logs, provide thetruevalue. -
command_center_enabled: Transferring Command Center logs,trueorfalse. -
greenplum_enabled: Transferring Greenplum® logs,trueorfalse. -
pooler_enabled: Transferring connection pooler logs,trueorfalse. -
folder_id: Specify the ID of the folder whose log group you want to use. -
log_group_id: ID of the log group to write logs to.Specify either
folder_idorlog_group_id.
-
-
Make sure the settings are correct.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validateTerraform will show any errors found in your configuration files.
-
-
Confirm updating the resources.
-
Run this command to view the planned changes:
terraform planIf you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply -
Confirm updating the resources.
-
Wait for the operation to complete.
-
Warning
The Terraform provider limits the amount of time for all Yandex MPP Analytics for PostgreSQL cluster operations to complete to 120 minutes.
Operations exceeding the set timeout are interrupted.
How do I change these limits?
Add the
timeoutsblock 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 in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Use the Cluster.Update method and send the following 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
updateMaskparameter 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": "logging.enabled,logging.commandCenterEnabled,logging.greenplumEnabled,logging.poolerEnabled,logging.folderId", "logging": { "enabled": "<enable_transferring_logs>", "commandCenterEnabled": "<transfer_Yandex_Command_Center_logs>", "greenplumEnabled": "<transfer_Greenplum®_logs>", "poolerEnabled": "<transfer_connection_pooler_logs>", "folderId": "<folder_ID>" } }'Where:
-
updateMask: Comma-separated string of settings you want to update. -
logging: Logging settings:-
enabled: Manages log transfer,trueorfalse. To enable parameters responsible for transferring specific logs, provide thetruevalue. -
commandCenterEnabled: Transferring Command Center logs,trueorfalse. -
greenplumEnabled: Transferring Greenplum® logs,trueorfalse. -
poolerEnabled: Transferring connection pooler logs,trueorfalse. -
folderId: Specify the ID of the folder whose log group you want to use. -
logGroupId: ID of the log group to write logs to.Specify either
folderIdorlogGroupId.
-
You can get the cluster ID with the list of clusters in the folder.
-
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and put it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Use the ClusterService.Update call and send the following 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_maskparameter 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": [ "logging.enabled", "logging.command_center_enabled", "logging.greenplum_enabled", "logging.pooler_enabled", "logging.folder_id" ] }, "logging": { "enabled": "<enable_transferring_logs>", "command_center_enabled": "<transfer_Yandex_Command_Center_logs>", "greenplum_enabled": "<transfer_Greenplum®_logs>", "pooler_enabled": "<transfer_connection_pooler_logs>", "folder_id": "<folder_ID>" } }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.greenplum.v1.ClusterService.UpdateWhere:
-
update_mask: List of parameters to update as an array of strings (paths[]). -
logging: Logging settings:-
enabled: Manages log transfer,trueorfalse. To enable parameters responsible for transferring specific logs, provide thetruevalue. -
command_center_enabled: Transferring Command Center logs,trueorfalse. -
greenplum_enabled: Transferring Greenplum® logs,trueorfalse. -
pooler_enabled: Transferring connection pooler logs,trueorfalse. -
folder_id: Specify the ID of the folder whose log group you want to use. -
log_group_id: ID of the log group to write logs to.Specify either
folder_idorlog_group_id.
-
You can get the cluster ID with the list of clusters in the folder.
-
-
Check the server response to make sure your request was successful.
Greenplum® and Greenplum Database® are registered trademarks or trademarks of Broadcom Inc. in the United States and/or other countries.