General questions about Managed Service for PostgreSQL
-
What part of database management and maintenance is Managed Service for PostgreSQL responsible for?
-
Which PostgreSQL version does Managed Service for PostgreSQL use?
-
How can I change the computing resources and storage size for a database cluster?
-
When are backups performed? Is a database cluster available during a backup?
-
What limitations are imposed 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 the cluster slow even though the computing resources are not used fully?
What is Managed Service for PostgreSQL?
Managed Service for PostgreSQL is a solution that helps you create, operate, and scale PostgreSQL databases in the cloud.
With Managed Service for PostgreSQL, you can:
- Create a database with performance tailored to your needs.
- Scale computing power and dedicated storage capacity for your databases as needed.
- Get database logs.
Managed Service for PostgreSQL takes over time-consuming tasks pertaining to PostgreSQL infrastructure administration:
- Monitors resource usage.
- Automatically creates DB backups.
- Provides 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 as if it were a regular database in your local infrastructure. Thus, you can manage internal database settings to meet your application requirements.
What is the role of Managed Service for PostgreSQL in database management and maintenance?
When you create clusters, Managed Service for PostgreSQL allocates resources, installs the DBMS, and creates databases.
For all created and running databases, Managed Service for PostgreSQL automatically creates backups as well as applies DBMS patches and updates.
Furthermore, Managed Service for PostgreSQL ensures data replication across database hosts, both within and across availability zones, with automatic failover to a standby replica if a failure occurs.
Be mindful of what is what is controlled by the service, and what by the Yandex Cloud customer. Understanding these control zones will help you use your cloud resources effectively and avoid potential database-related problems. 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 two ways to work with databases:
- Managed Service for PostgreSQL: Enables you to operate template databases without needing to handle their administration.
- Alternatively, with Yandex Compute Cloud virtual machines, you can create and customize your own databases. This approach allows you to use any database management system, connect to databases over SSH, and many more.
What is a database host and 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 creating a database cluster in Managed Service for PostgreSQL, you need to decide on its configuration:
- Host class that will determine your computing power, i.e., vCPUs, RAM, and more.
- Storage size (fully reserved when creating the cluster).
- Network for your cluster.
- Number of hosts in your cluster and availability zone for each host.
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 (
-
At least one host for the following disk types:
- Network HDDs (
network-hdd) - Network SSDs (
network-ssd) - Ultra high-speed network SSDs with three replicas (
network-ssd-io-m3)
- Network HDDs (
The maximum number of hosts per cluster cannot exceed the set limits.
For more information, see Quotas and limits in Managed Service for PostgreSQL.
How can I access a running database host?
You can connect to Managed Service for PostgreSQL databases using conventional DBMS methods.
Learn more about connecting to clusters in this guide.
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 installation of DBMS updates and patches for all hosts, even disabled ones.
- Changes in the host class and storage size.
- Other Managed Service for PostgreSQL maintenance activities.
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?
The database software is updated whenever new minor versions are released. Owners of affected DB clusters get info regarding an expected maintenance period and DB availability in advance.
What happens when a DBMS version becomes deprecated?
One month after the database version becomes deprecated, Managed Service for PostgreSQL automatically sends email notifications to the owners of DB clusters created with this version.
New hosts can no longer be created using deprecated DBMS versions. Database clusters are automatically upgraded to the next supported version seven days after notification for minor versions and one month after notification for major versions. Deprecated major versions will be upgraded even if you disabled automatic updates.
How do you calculate usage cost for a database host?
In Managed Service for PostgreSQL, the usage cost is calculated based on the following:
- Selected host class.
- Reserved storage capacity for the database host.
- Size of database cluster backups. You do not pay for backups as long as their size does not exceed the storage capacity. Additional backup storage is charged according to our pricing policy.
- Database host uptime in hours. Partial hours are rounded to the nearest whole hour. The hourly rates for each host class are listed in Managed Service for PostgreSQL pricing policy.
How can I change the computing resources and storage size 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 activities, 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 provide 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 seven days.
When does a backup run? Is a database cluster available 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 available 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:
- Absolute CPU, memory, network, and disk utilization.
- Amount of data in a database cluster and the remaining free space in your data storage.
For all database hosts, you can monitor metrics specific to their DBMS type. For example, for PostgreSQL, you can monitor:
- Average query execution time.
- Number of queries per second.
- Number of errors in logs, and more.
You can monitor metrics with a minimum granularity of five 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 functionality has been enhanced: it now has theAUTOvalue by default. This means theVACUUMcommand skips index cleaning if it considers it unnecessary. For backward compatibility with older PostgreSQL versions, setINDEX_CLEANUPtoON.
Why is my cluster slow even though the computing resources are not 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 values and make throttling less likely, expand the storage 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.