Yandex MPP Analytics for PostgreSQL version upgrade
You can change the database version of your Yandex MPP Analytics for PostgreSQL cluster.
Note
Greenplum® upgrades from version 6.28 to 6.29 are supported.
The following upgrades are not supported:
- Manual upgrades between Greenplum® patch versions, e.g., from 6.29.1 to 6.29.2. Such upgrades are performed automatically during maintenance.
- Apache Cloudberry™ version upgrades.
- Migrations between Greenplum® and Apache Cloudberry™.
To learn about upgrades within the same version and host maintenance, see Maintenance.
Viewing a list of available versions
In the management console
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Call the Versions.List method, e.g., via the following cURL
request:curl \ --request GET \ --header "Authorization: Bearer $IAM_TOKEN" \ --url 'https://mdb.api.cloud.yandex.net/managed-greenplum/v1/versions' -
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and put it into 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. -
Call the VersionsService.List 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/versions_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.greenplum.v1.VersionsService.List -
Check the server response to make sure your request was successful.
Before a version upgrade
Make sure the upgrade will not disrupt your applications:
-
Learn how upgrades may affect your applications:
-
Try upgrading a test cluster. You can deploy it from a backup of the main cluster, if Yandex MPP Analytics for PostgreSQL supports the database version in the backup.
-
Back up your main cluster before upgrading.
Upgrading a cluster
Alert
Once your database version is upgraded, you cannot revert the cluster to the previous version.
- In the management console
, navigate to the relevant folder. - Navigate to Yandex MPP Analytics for PostgreSQL.
- In the cluster row, click
and select Edit. - Select the new version number in the Version field.
- Click Save.
-
Open the current Terraform configuration file with the infrastructure plan.
For information on how to create this file, see Creating a cluster Yandex MPP Analytics for PostgreSQL.
-
In the
configsection of the Yandex MPP Analytics for PostgreSQL cluster, add theversionfield (the database version) or update its value if it already exists:resource "yandex_mdb_greenplum_cluster" "<cluster_name>" { ... version = "<version>" } -
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.
-
-
For more information, see this Terraform provider guide.
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Call the Cluster.update method, e.g., via the following cURL
request: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.version", "config": { "version": "<version>" } }'Where:
-
updateMask: Comma-separated string of settings to update.Here, we only specified a single setting,
config.version. -
config.version: Target database version.
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.
-
Get an IAM token for API authentication and put it into 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. -
Call the ClusterService/Update method, e.g., via the following gRPCurl
request: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.version" ] }, "config": { "version": "<version>" } }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.greenplum.v1.ClusterService.UpdateWhere:
-
update_mask: List of settings to update as an array of strings (paths[]).Here, we only specified a single setting,
config.version. -
config.version: Target database version.
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.