Inspections and recommendations in Managed Service for PostgreSQL
- Available Managed Service for PostgreSQL inspections
- Risk of reduced performance
- Risk of data loss and cluster unavailability in the event of a zone failure due to asynchronous replicas
- Not enough RAM
- Risk of cluster unavailability
- Risk of data loss and cluster unavailability if an availability zone fails
- Risk of data loss and cluster unavailability in the event of a zone failure (quorum)
- Disk space autoscaling is limited
Managed database clusters regularly undergo diagnostics to detect possible issues, increase the cluster's reliability, and improve its performance. The results of such checks are displayed as inspections under Recommendations. You can see notifications about successful checks and recommendations on eliminating discovered risks. The responsibility to troubleshoot any detected issues lies within the Yandex Cloud user's remit.
All checks have a severity level:
- High level: Criteria of high cluster availability, significant risks of reduced performance, data loss risks. Such checks warrant special attention and require following the recommendations provided.
- Moderate level: Possible risks of reduced performance, suboptimal memory and disk space usage.
- Low level: Potential risks and cluster operation limitations.
The list of recommendations is updated regularly. For each recommendation, the following timestamps are fixed: the date of the risk's first detection and the date of the most recent status update on this issue. If the recommendation seems to be excessive or incorrect, you can hide it, specifying a reason. Once the hiding period expires, the recommendation will automatically become available again if the issue persists.
Recommendations are available at the cluster, folder, and cloud levels and provide tips for all your resources. However, the absence of recommendations does not mean that your cluster is optimized: the list of checks gets continuously appended but still remains incomprehensive and cannot replace monitoring, since it is targeted at detecting patterns rather than specific issues. You can additionally run cluster performance diagnostics and analyze monitoring metrics.
Managing recommendations in Managed Service for PostgreSQL requires the managed-postgresql.editor role or higher.
Available Managed Service for PostgreSQL inspections
| Category | Check | Risk | Severity |
|---|---|---|---|
| Performance | CPU usage | Risk of reduced performance | High |
| High availability | Availability of synchronous replicas in a cluster | Risk of data loss and cluster unavailability in the event of a zone (replica) failure | High |
| High availability | Memory allocation | Lack of RAM | High |
| High availability | Allocating disk space | Risk of cluster unavailability | High |
| High availability | High cluster availability during zone failure | Risk of data loss and cluster unavailability in the event of a zone failure | High |
| High availability | High cluster availability in the event of a zone failure (quorum) | Risk of data loss and cluster unavailability in the event of a zone failure (quorum) | High |
| High availability | Disk autoscaling feature | Disk space autoscaling is limited | Moderate |
Risk of reduced performance
Description
The host continuously uses all CPU resources, which may cause delays in query processing. Check the load and optimize your queries, including those sent via the WebSQL AI assistant, or increase the computing resources allocated to your cluster.
Action
To increase the cluster computing resources:
- Navigate to Managed Service for PostgreSQL.
- Select your cluster and click
Edit. - Under Resources, select a host class with the required amount of vCPUs.
- Click Save changes.
Risk of data loss and cluster unavailability in the event of a zone failure due to asynchronous replicas
Description
The cluster uses only asynchronous replicas, which does not guarantee fault tolerance. Add at least one synchronous replica to another zone to ensure high availability.
Action
To move a host to a different availability zone:
-
Create a subnet in the target availability zone for the host.
-
Add a host to your cluster: navigate
to Managed Service for PostgreSQL. -
Click the cluster name and navigate to the Hosts tab.
-
Click
Create host. -
Specify the following host settings:
- Target availability zone for your hosts.
- New subnet.
- To make the host accessible from outside Yandex Cloud, select Public access.
-
Click Save.
Not enough RAM
Description
The cluster is running out of RAM, which leads to slow performance or emergency shutdowns. Increase the cluster's RAM.
Action
To increase the amount of RAM:
- Navigate to Managed Service for PostgreSQL.
- Select your cluster and click
Edit. - Under Resources, select a host class with the required amount of RAM.
- Click Save changes.
Risk of cluster unavailability
Description
Your host is critically low on free space. Some operations may be disabled, while the whole cluster may become unavailable, i.e., switch to read-only mode. Increase the disk size or clear unused data.
Action
To increase the disk size:
- Navigate to Managed Service for PostgreSQL.
- Select your cluster and click
Edit. - Under Storage, increase the disk size.
- Click Save changes.
Risk of data loss and cluster unavailability if an availability zone fails
Description
All cluster hosts are in the same availability zone. In case the zone fails, the cluster becomes unavailable. Put replicas in different zones to ensure high availability.
Note
Single-host clusters are excluded from high availability testing: Yandex Cloud users are fully responsible for managing such a configuration.
Action
To move a host to a different availability zone:
-
Create a subnet in the target availability zone for the host.
-
Add a host to your cluster: navigate
to Managed Service for PostgreSQL. -
Click the cluster name and navigate to the Hosts tab.
-
Click
Create host. -
Specify the following host settings:
- Target availability zone for your hosts.
- New subnet.
- To make the host accessible from outside Yandex Cloud, select Public access.
-
Click Save.
Risk of data loss and cluster unavailability in the event of a zone failure (quorum)
Description
Your current configuration allows the replication quorum to be met entirely within a single availability zone. If this zone becomes unavailable, you may lose your data. Increase the host count in other zones or make sure the quorum number is larger than the number of hosts in any single zone.
Action
To add a host to another zone:
- Navigate to Managed Service for PostgreSQL.
- Select the cluster and open the Hosts tab.
- Click Create host.
- In the host parameters, specify an alternative availability zone.
- Finish configuring the host and click Save.
To move a host to a different availability zone:
-
Create a subnet in the target availability zone for the host.
-
Add a host to your cluster: navigate
to Managed Service for PostgreSQL. -
Click the cluster name and navigate to the Hosts tab.
-
Click
Create host. -
Specify the following host settings:
- Target availability zone for your hosts.
- New subnet.
- To make the host accessible from outside Yandex Cloud, select Public access.
-
Click Save.
To learn more about the replication quorum, see Replication in Managed Service for PostgreSQL.
Disk space autoscaling is limited
Description
The disk autoscaling limit has been reached, so the cluster cannot increase its disk space when needed. Change the autoscaling settings in the cluster and increase the limit.
Action
To increase the disk size:
- Navigate to Managed Service for PostgreSQL.
- Select your cluster and click
Edit. - Specify the maximum storage size after the expansion in the Maximum storage size field.
- Click Save changes.