General questions about Managed Service for PostgreSQL
-
What parts of database management and maintenance does Managed Service for PostgreSQL handle?
-
When should I use Managed Service for PostgreSQL, and when should I use VMs running databases?
-
Which PostgreSQL version does Managed Service for PostgreSQL use?
-
How can I change the compute and storage capacity for a database cluster?
-
When does the backup run? Does a database cluster remain online during backups?
-
Is encryption enabled for PostgreSQL database cluster connections?
-
What restrictions are placed on PostgreSQL database clusters?
-
What PostgreSQL extensions are supported in Managed Service for PostgreSQL?
-
Does the service comply with the Russian Federal Law 152-FZ on personal data?
-
Why is my cluster slow even though the computational resources are not being fully utilized?
What is Managed Service for PostgreSQL?
Managed Service for PostgreSQL is a service that helps you create, operate, and scale PostgreSQL databases in the cloud.
With Managed Service for PostgreSQL, you can:
- Create databases with performance settings tailored to your needs.
- Scale your database compute and dedicated storage capacity as needed.
- Access database performance and activity logs.
Managed Service for PostgreSQL handles the heavy lifting of PostgreSQL infrastructure administration for you:
- Provides monitoring of your resource consumption.
- Automatically backs up your databases.
- Ensures fault tolerance through automatic failover to backup replicas.
- Keeps your DBMS software up to date.
You work with a Managed Service for PostgreSQL database cluster just like with your local database. This allows you to fine-tune your database’s internal settings to meet your application’s specific requirements.
What parts of database management and maintenance does Managed Service for PostgreSQL handle?
During cluster creation, Managed Service for PostgreSQL allocates resources, installs the DBMS, and creates the databases.
Managed Service for PostgreSQL automatically manages backups and applies DBMS patches and updates for your deployed databases.
Furthermore, Managed Service for PostgreSQL ensures data replication, both within and across availability zones, with automatic failover to a standby replica during a failure.
Be mindful of what is managed by the service and what, by the Yandex Cloud customer. Understanding these areas of management helps you use your cloud resources efficiently and avoid potential database-related issues. For more information, see Zones of control between managed database (MDB) service users and Yandex Cloud.
When should I use Managed Service for PostgreSQL, and when should I use VMs running databases?
Yandex Cloud offers you two ways to work with databases:
- With Managed Service for PostgreSQL, you can use template databases, with no administrative effort required.
- Alternatively, with Yandex Compute Cloud virtual machines, you can create and customize your own databases. This approach enables you to use any database management system, access databases via SSH, and more.
What is a database host and what is a database cluster?
A database host is a cloud-based isolated database environment with dedicated computing resources and reserved storage capacity.
A database cluster consists of one or more database hosts with configurable replication between them.
How do I get started with Managed Service for PostgreSQL?
Managed Service for PostgreSQL is available to all registered Yandex Cloud users.
Before you create a database cluster in Managed Service for PostgreSQL, first, decide on its key specifications:
- Host class will determine your computing power: vCPUs, RAM, and more.
- Storage size (fully provisioned once you create the cluster).
- Network for your cluster.
- Number of hosts in your cluster and their availability zones.
Learn more in Getting started with Managed Service for PostgreSQL.
How many database hosts can be in a cluster?
The minimum number of hosts depends on the selected storage type:
-
A minimum of three hosts is required for the following disk types:
- Local SSDs (
local-ssd) - Non-replicated SSDs (
network-ssd-nonreplicated)
- Local SSDs (
-
A single host is sufficient for the following disk types:
- Network HDDs (
network-hdd) - Network SSDs (
network-ssd) - Ultra-fast network SSDs with triple replication (
network-ssd-io-m3)
- Network HDDs (
The maximum number of hosts in a cluster is subject to your quota limits.
For more information, see Quotas and limits in Managed Service for PostgreSQL.
How to get access to a running host?
You can connect to Managed Service for PostgreSQL databases using standard DBMS connection methods.
For details on connecting to clusters, see this article.
How many clusters can I create within a single cloud?
To learn about MDB quotas and limits, see Quotas and limits in Managed Service for PostgreSQL.
How are database clusters maintained?
Maintenance in Managed Service for PostgreSQL includes:
- Automatic DBMS updates and patches for all hosts, even in stopped clusters.
- Scaling computing resources and storage capacity of cluster hosts.
- Other Managed Service for PostgreSQL maintenance tasks.
Learn more in Maintenance in Managed Service for PostgreSQL.
Which PostgreSQL version does Managed Service for PostgreSQL use?
Managed Service for PostgreSQL supports PostgreSQL versions 13-17, and PostgreSQL versions 13-16 for use with 1C.
What happens when a new DBMS version is released?
We update the database software with each new minor release. In advance of the planned updates, we notify the owners of the affected database clusters about the maintenance schedule and any expected downtimes.
What happens when a DBMS version becomes deprecated?
Managed Service for PostgreSQL will automatically email you one month after your cluster’s DBMS version becomes deprecated.
Starting from that moment, you can no longer create new database hosts using this DBMS version. Database clusters are automatically updated to the next supported version 7 days after notification for minor releases and 1 month after notification for major releases. Deprecated major versions will be updated even with automatic updates turned off.
How do you calculate usage cost for a database host?
In Managed Service for PostgreSQL, the usage cost is calculated based on the following parameters:
- Selected host class.
- Reserved storage capacity for the database host.
- Size of the database cluster backups. You get free backup storage equal to your total database storage. Additional backup storage is charged based on our pricing policy.
- Database host uptime in hours. Partial hours are rounded up to the next hour. The hourly rates for each host class are listed in Managed Service for PostgreSQL pricing policy.
How can I change the compute and storage capacity for a database cluster?
You can scale your computing resources and storage size directly in the management console by selecting a different host class for your cluster.
The cluster settings will update within 30 minutes. This window may also be used for other maintenance tasks, such as installing updates.
Can I configure automatic storage expansion for a cluster?
Yes, you can enable automatic storage scaling when creating or updating your cluster.
Are database host backups enabled by default?
Yes, backups are enabled by default. The PostgreSQL backup policies include full daily backups and continuous transaction log archiving. This enables point-in-time recovery, allowing you to restore your cluster to any moment within the backup retention period, with the exception of the last 30 seconds.
By default, backups are retained for 7 days.
When does the backup run? Does a database cluster remain online during backups?
The backup window, the scheduled time for the database cluster’s full daily backup, is from 01:00 to 05:00 (UTC+3).
Clusters remain fully accessible during the backup window.
Is encryption enabled for PostgreSQL database cluster connections?
Connections between your database cluster and application are always encrypted with SSL. You cannot disable encryption for cluster connections.
What is a read-only replica in PostgreSQL?
A read-only replica is a PostgreSQL database cluster host available only for reads that synchronizes its data with the master host. This applies only to clusters with more than one host. You can use a read-only replica to reduce the load on the master host experiencing high read traffic to its database.
What metrics and processes can be monitored?
For all DBMS types, you can monitor the following metrics:
- Absolute CPU, memory, network, and disk utilization.
- Total database cluster size and remaining free storage space.
For database hosts, you can track metrics specific to their DBMS type. For example, for PostgreSQL, you can monitor the following metrics:
- Average query execution time.
- Queries per second.
- Error count in logs, etc.
Monitoring is available with a minimum granularity of 5 seconds.
Can I get logs of my operations in Yandex Cloud?
Yes, you can request information about operations with your resources from Yandex Cloud logs. Do it by contacting support
What restrictions are placed on PostgreSQL database clusters?
To learn about Managed Service for PostgreSQL quotas and limits, see Quotas and limits in Managed Service for PostgreSQL. Also refer to PostgreSQL host classes for the specifications of clusters you can create with Managed Service for PostgreSQL.
What PostgreSQL extensions are supported in Managed Service for PostgreSQL?
See the list of supported PostgreSQL extensions in Managing extensions.
Can I get superuser privileges in PostgreSQL?
No, superuser privileges are not available to Managed Service for PostgreSQL users. Cluster actions of all types are available to users with the mdb_admin role.
Can I copy data from a Managed Service for PostgreSQL table to a local file? Can I populate a table with data from a local file?
Yes, you can both copy data from a table to a local file and import data from a file into a table. For more information, see Copying and populating a table from a local machine.
Are there any specific features or restrictions for the garbage collector in a Managed Service for PostgreSQL cluster?
Managed Service for PostgreSQL clusters support all VACUUM command
- To run
VACUUM FULL, the user must have themdb_adminrole. The VACUUM FULL operation does not affect system tables. - In PostgreSQL version 14, the
INDEX_CLEANUPparameter has been enhanced and now defaults toAUTO. This means theVACUUMcommand will skip index cleanup if it deems it unnecessary. For backward compatibility with older PostgreSQL versions, setINDEX_CLEANUPtoON.
Why is my cluster slow even though the computational resources are not being fully utilized?
Your storage may have insufficient maximum IOPS and bandwidth to process the current number of requests. In this case, throttling occurs, which degrades the entire cluster performance.
The maximum IOPS and bandwidth values increase by a fixed value when the storage size increases by a certain step. The step and increment values depend on the disk type:
| Disk type | Step, GB | Max IOPS increase (read/write) | Max bandwidth increase (read/write), MB/s |
|---|---|---|---|
network-hdd |
256 | 300/300 | 30/30 |
network-ssd |
32 | 1,000/1,000 | 15/15 |
network-ssd-nonreplicated, network-ssd-io-m3 |
93 | 28,000/5,600 | 110/82 |
To increase the maximum IOPS and bandwidth and reduce the risk of throttling, increase the storage size when updating your cluster.
If you are using the network-hdd storage, consider switching to network-ssd or network-ssd-nonreplicated by restoring the cluster from a backup.