Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Managed Service for PostgreSQL
  • Getting started
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
    • General questions
    • Connection
    • Updating a cluster
    • Cluster configuration
    • Moving and restoring a cluster
    • Users and roles
    • High availability and load balancing
    • Monitoring and logs
    • Error messages
    • All questions on one page

In this article:

  • General questions
  • Connection
  • Updating a cluster
  • Cluster parameter settings
  • Moving and restoring a cluster
  • Users and roles
  • High availability and load balancing
  • Monitoring and logs
  • Error messages
  1. FAQ
  2. All questions on one page

FAQ about Managed Service for PostgreSQL

Written by
Yandex Cloud
Updated at November 14, 2025
  • General questions
  • Connection
  • Updating a cluster
  • Cluster parameter settings
  • Moving and restoring a cluster
  • Users and roles
  • High availability and load balancing
  • Monitoring and logs
  • Error messages

General questionsGeneral questions

  • What is Managed Service for PostgreSQL?

  • What part of database management and maintenance is Managed Service for PostgreSQL responsible for?

  • Which tasks are best addressed using Managed Service for PostgreSQL, and which using VMs with databases?

  • What is a database host and database cluster?

  • How do I get started with Managed Service for PostgreSQL?

  • How many database hosts can there be in one cluster?

  • How can I access a running DB host?

  • How many clusters can I create within a single cloud?

  • How are DB clusters maintained?

  • Which PostgreSQL version does Managed Service for PostgreSQL use?

  • What happens when a new DBMS version is released?

  • What happens when a DBMS version becomes deprecated?

  • How do you calculate usage cost for a database host?

  • How can I change the computing resources and storage size for a database cluster?

  • Can I configure auto increase of cluster storage size?

  • Is database host backup enabled by default?

  • When are backups performed? Is a database cluster available during a backup?

  • Are PostgreSQL database cluster connections encrypted?

  • What is a read-only replica in PostgreSQL?

  • What metrics and processes can be tracked using monitoring?

  • How do I get the logs of my actions in the services?

  • What limitations are imposed on PostgreSQL database clusters?

  • What PostgreSQL extensions are supported in Managed Service for PostgreSQL?

  • Which data center stores PostgreSQL cluster backups?

  • Does the service comply with the Russian Federal Law 152-FZ on personal data?

  • Can I get superuser privileges in PostgreSQL?

  • 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?

  • Are there any special aspects or restrictions on the use of a garbage collector in Managed Service for PostgreSQL clusters?

  • Why is the cluster slow even though the computing resources are not used fully?

ConnectionConnection

  • Is the cluster accessible from inside Yandex Cloud?

  • Can I connect to the cluster from a Docker container?

  • How do I obtain an SSL certificate to connect to Managed Service for PostgreSQL on Windows?

  • How do I install an SSL certificate to connect Power BI to Managed Service for PostgreSQL using psql?

  • Can I connect to cluster hosts over SSH?

  • What is the maximum allowed number of concurrent connections to a single host in Managed Service for PostgreSQL?

  • What is the allowed number of connections per user?

  • Why does an error occur when trying to connect to a database from Looker Studio?

  • How do I always connect to the master host?

  • How do I always connect to the most recent replica?

  • How do I connect to the postgres database?

  • How do I get the postgres user password?

Updating a clusterUpdating a cluster

  • Why did the cluster change its status to Updating during an unscheduled backup?

  • Can I create two PostgreSQL databases at the same time?

  • Can I change the number of connections available to a user?

  • Can I change the class of an existing host (standard, memory-optimized, burstable)?

  • Can I change the disk type in an existing cluster?

  • Can I manage a cluster using SQL commands?

  • Can I create a database using SQL commands?

  • How to recover a cluster from read-only mode?

Cluster parameter settingsCluster parameter settings

  • Is autovacuum enabled for all tables by default?

  • What are the default LC_COLLATE and LC_CTYPE values for databases?

  • Can I change the LC_COLLATE and LC_CTYPE values?

  • Can I change the database owner?

Moving and restoring a clusterMoving and restoring a cluster

  • Can I restore a cluster backup to a running Managed Service for PostgreSQL instance in a different cloud network?

  • Can I change the retention period of automatic backups?

  • Do I need the wal2json plugin if there is only data replication and no copying?

  • Can I make a local dump of a database backup?

  • How do I move a local PostgreSQL database dump to Yandex Cloud?

  • How do I migrate a database or table from one cluster to another?

  • How do I transfer data between clusters in different folders or clouds?

  • How do I move a cluster to another cloud?

  • How do restore a backup to an existing cluster?

  • How do I restore the cluster state to the selected backup?

  • Can I recover a single database from a backup?

Users and rolesUsers and roles

  • Can I migrate users from a PostgreSQL source cluster to a Managed Service for PostgreSQL target cluster?

  • How to create a role using SQL queries?

High availability and load balancingHigh availability and load balancing

  • How to exclude a host from the master selection?

  • Why do I get an error when setting up cascading replication?

  • How do I always connect to the master host?

  • How do I always connect to the most recent replica?

  • Why did the master and the replicas switch places?

  • Can I configure multimaster in a cluster or between two clusters?

  • How to configure load balancing so that read requests go to replicas?

  • Why does the master fail over to a randomly selected host when autofailover is off?

  • Why does the master fail over when the cluster recovers, even though autofailover is off?

  • Why does the master fails over automatically during maintenance operations, even though autofailover is off?

Monitoring and logsMonitoring and logs

  • Where can I track my use of disk space to avoid exceeding the 95% read-only limit?

  • Are logs stored on the same disk as PostgreSQL data? How are they charged?

  • What is the retention period for logs?

  • What are WALs and what are they used for?

  • What does the Cached parameter mean in PostgreSQL cluster host RAM monitoring?

  • How do I get alerts on critical PostgreSQL cluster parameters?

  • How do I set up an alert that triggers as soon as a certain percentage of disk space has been used up?

Error messagesError messages

  • Why do I get an error when using the TimescaleDB extension?

  • What should I do if I get a revocation check error when using PowerShell to obtain an SSL certificate?

  • What should I do if I get the SSL is required error when connecting?

  • What should I do if I get the too many active clients for user error when connecting?

  • Why do I get an error when connecting to a custom database?

  • Why do I get an error when creating a dump with pg_dumpall?

  • Why do I get an error when connecting to a postgres database?

  • Why does the connection terminate with terminating connection due to administrator command?

  • Why cannot I connect to cluster hosts?

  • Why cannot I stop a cluster?

  • Why do I get the max_connections is less than sum of users connection limit error when changing a cluster?

  • Why can a data transfer through creating and restoring a logical dump fail with an error?

  • What should I do if I get the replication slot already exists error when performing logical replication?

  • Why do I get an extension... is not available error when migrating my DB to Managed Service for PostgreSQL?

  • Why do I get the must be owner of extension error when deploying a logical dump?

  • Why do I get an error when setting up cascading replication?

  • Why do I get the cannot execute <SQL_command> in a read-only transaction error?

  • What should I do if logs display the too many connections for role "monitor" error?

  • Why do I get an error when trying to install multiple extensions in the CLI?

General questionsGeneral questions

What is Managed Service for PostgreSQL?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?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 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?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 manage their administration.
  • Yandex Compute Cloud VM: Enables you to create and configure your own databases. With this approach, you can use any database management systems, access databases via SSH, and more.

What is a database host and what is a database cluster?What is a database host and what is a database cluster?

A database host is an isolated database environment in the cloud with dedicated computing resources and a reserved storage capacity.

A database cluster is one or more database hosts that allow configuring replication between them.

How do I get started with Managed Service for PostgreSQL?How do I get started with Managed Service for PostgreSQL?

Managed Service for PostgreSQL is available to all registered Yandex Cloud users.

To create a database cluster in Managed Service for PostgreSQL, you need to define its settings:

  • Host class (performance parameters, such as CPUs, RAM, etc.).
  • Storage size (fully reserved when creating the cluster).
  • Network your cluster will be connected to.
  • Number of hosts for your cluster and availability zone for each host.

For detailed instructions, see Getting started with Managed Service for PostgreSQL.

How many database hosts can be in a cluster?How many database hosts can be in a cluster?

The minimum number of hosts depends on the selected type of storage:

  • A minimum of three hosts for these disks:

    • Local SSDs (local-ssd)
    • Non-replicated SSDs (network-ssd-nonreplicated)
  • A minimum of one host for these disks:

    • Network HDDs (network-hdd)
    • Network SSDs (network-ssd)
    • Ultra high-speed network SSDs with three replicas (network-ssd-io-m3)

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 to get access to a running host?How to get access to a running host?

You can connect to Managed Service for PostgreSQL databases using standard DBMS methods.

Learn more about connecting to clusters here.

How many clusters can I create within a single cloud?How many clusters can I create within a single cloud?

MDB technical and organizational limits are given in Quotas and limits in Managed Service for PostgreSQL.

How are database clusters maintained?How are database clusters maintained?

In Managed Service for PostgreSQL, maintenance implies:

  • Automatic installation of DBMS updates and fixes for DB hosts (including disabled clusters).
  • Changes to the host class and storage size.
  • Other Managed Service for PostgreSQL maintenance activities.

For more information, see Maintenance in Managed Service for PostgreSQL.

Which PostgreSQL version does Managed Service for PostgreSQL use?Which PostgreSQL version does Managed Service for PostgreSQL use?

Managed Service for PostgreSQL supports PostgreSQL 13, 14, 15, 16, and 17, as well as PostgreSQL 13, 14, 15, and 16 for 1C.

What happens when a new DBMS version is released?What happens when a new DBMS version is released?

The database software is updated when new minor versions are released. Owners of the affected DB clusters are notified of an expected maintenance period and DB availability in advance.

What happens when a DBMS version becomes deprecated?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 are going to be upgraded even if you have disabled automatic updates.

How do you calculate usage cost for a database host?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.
  • Size of storage reserved for the database host.
  • Size of the database cluster backups. Backup size equal to the storage size is free of charge. Backup storage that exceeds this size is charged based on the pricing policy.
  • Database host uptime in hours. Partial hours are rounded up to the nearest whole hour. To find out the cost per hour of operation for each host class, see Managed Service for PostgreSQL pricing policy.

How can I change the compute and storage capacity for a database cluster?How can I change the compute and storage capacity for a database cluster?

You can change computing resources and storage size in the management console. All you need to do is choose a different host class for the relevant cluster.

The cluster settings update within 30 minutes. This period may also include other cluster maintenance activities, such as installing updates.

Can I configure automatic storage expansion for a cluster?Can I configure automatic storage expansion for a cluster?

Yes, you can set up automatic increase of the storage size when creating or updating a cluster.

Are database host backups enabled by default?Are database host backups enabled by default?

Yes, backup is enabled by default. For PostgreSQL, a full backup takes place once a day and saves all DB cluster transaction logs. This allows you to restore the cluster state to any point in time during the backup storage period, except for the last 30 seconds.

By default, backups are stored for seven days.

When are backups created? Does a database cluster remain online during backups?When are backups created? Does a database cluster remain online during backups?

The backup window is an interval during which a full daily backup of the DB cluster is performed. The backup window 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?Is encryption enabled for PostgreSQL database cluster connections?

Connections between a database cluster and an application are always encrypted using SSL. You cannot disable cluster connection encryption.

What is a read-only replica in PostgreSQL?What is a read-only replica in PostgreSQL?

A read-only replica is a PostgreSQL DB cluster host available only for reads. Its data is synced with the master host (applies only if the cluster has more than 1 host). You can use a read-only replica to reduce the load on the DB master host with a large number of read requests.

What metrics and processes can be monitored?What metrics and processes can be monitored?

For all DBMS types, you can monitor:

  • CPU, memory, network, or disk usage, in absolute terms.
  • Amount of data in the DB cluster and the remaining free space in the data storage.

For DB hosts, you can monitor metrics specific to their type of DBMS. For example, for PostgreSQL, you can monitor:

  • Average query execution time.
  • Number of queries per second.
  • Number of errors in logs, and more.

Monitoring can be performed with a minimum granularity of five seconds.

Can I get logs of my operations in Yandex Cloud?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?What restrictions are placed on PostgreSQL database clusters?

For more information about Managed Service for PostgreSQL limitations, see Quotas and limits in Managed Service for PostgreSQL. Characteristics of clusters that can be created using Managed Service for PostgreSQL are given in PostgreSQL host classes.

What PostgreSQL extensions are supported in Managed Service for PostgreSQL?What PostgreSQL extensions are supported in Managed Service for PostgreSQL?

The list of supported PostgreSQL extensions is provided in Managing extensions.

Can I get superuser privileges in PostgreSQL?Can I get superuser privileges in PostgreSQL?

No, you cannot. 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?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 populate a table with data from a local file. 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?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 parameters of the VACUUM command. However, you should consider the following specifics when using them:

  • To run VACUUM FULL, the user must have the mdb_admin role. The VACUUM FULL command does not affect system views.
  • In PostgreSQL version 14, the INDEX_CLEANUP parameter functionality has been enhanced: it now has the AUTO value by default. This means the VACUUM command skips index cleaning if it considers it unnecessary. To ensure backward compatibility with the previous PostgreSQL versions, set INDEX_CLEANUP to ON.

Why is my cluster slow even though the computational resources are not being fully utilized?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 values and make throttling less likely, increase the storage size when updating your cluster.

If you are using the network-hdd storage type, consider switching to network-ssd or network-ssd-nonreplicated by restoring the cluster from a backup.

ConnectionConnection

Can I access a cluster from within Yandex Cloud?Can I access a cluster from within Yandex Cloud?

You can connect to Managed Service for PostgreSQL cluster hosts:

  • Over the internet, if you configured public access for the appropriate host. You can only connect to such hosts over an SSL connection.
  • From Yandex Cloud virtual machines located in the same cloud network. If the host is not publicly accessible, there is no need to use SSL for connections from such virtual machines.
  • From a container in Yandex Serverless Containers. If the host is not publicly accessible, the container must be located in the same cloud network.

For more information, see the service documentation.

Can I connect to a cluster from a Docker container?Can I connect to a cluster from a Docker container?

Yes, you can. To do this, configure the Dockerfile.

You can find an example of connection from a container in Yandex Serverless Containers in this tutorial.

How do I obtain an SSL certificate to connect to Managed Service for PostgreSQL on Windows?How do I obtain an SSL certificate to connect to Managed Service for PostgreSQL on Windows?

You can obtain an SSL certificate using PowerShell:

mkdir $HOME\.postgresql; curl.exe --output $HOME\.postgresql\root.crt https://storage.yandexcloud.net/cloud-certs/CA.pem

The certificate will be saved to the $HOME\.postgresql\root.crt file.

For more information about obtaining a certificate and connecting to a database, see the service documentation.

How do I install an SSL certificate to connect Power BI to Managed Service for PostgreSQL via psql?How do I install an SSL certificate to connect Power BI to Managed Service for PostgreSQL via psql?

  1. Install Windows Subsystem for Linux (WSL) and run the following command in the terminal:

    mkdir /mnt/c/temp && \
    curl "https://storage.yandexcloud.net/cloud-certs/CA.pem" --output /mnt/c/temp/CA.pem && \
    openssl pkcs12 -export -out /mnt/c/temp/CA.pfx -nokeys -in /mnt/c/temp/CA.pem
    

    The certificate will be available at C:\temp\CA.pfx.

  2. Place the obtained certificate in the Windows certificate store.

Can I connect to cluster hosts over SSH?Can I connect to cluster hosts over SSH?

You cannot connect to hosts via SSH. This is done for the sake of security and user cluster fault tolerance because direct changes inside a host can render it completely inoperable.

What is the maximum allowed number of concurrent connections to a single host in Managed Service for PostgreSQL?What is the maximum allowed number of concurrent connections to a single host in Managed Service for PostgreSQL?

The number of concurrent connections is specified at the cluster level in the Max connections setting. By default, the maximum value is set, which is calculated by the following formula:

200 × <number_of_vCPUs_per_host>

For information about how to update the PostgreSQL settings at the cluster level, see our documentation.

What is the allowed number of connections per user?What is the allowed number of connections per user?

By default, a cluster reserves 50 connections to each host per user. You can change this number in the Conn limit setting.

If the connection limit per user is reached, any attempt to establish a new connection will fail with the following error:

too many active clients for user (pool_size for user <username> reached <limit_value>)

To learn how to update PostgreSQL settings at the user level, see this tutorial.

Why do I get an error when trying to connect to a database from Looker Studio?Why do I get an error when trying to connect to a database from Looker Studio?

To connect from Looker Studio, be sure to generate a client certificate file and a private key and specify them in the connection settings. For more information about how to do this, see Connecting from Looker Studio.

How do I always connect to the master host?How do I always connect to the master host?

To connect to the current master host, use a special FQDN. It has this format: c-<cluster_ID>.rw.mdb.yandexcloud.net. When connected to this FQDN, you will be able to perform read and write operations.

Example of command for connection to a master
psql "host=c-<cluster_ID>.rw.mdb.yandexcloud.net \
      port=6432 \
      sslmode=verify-full \
      dbname=<DB_name> \
      user=<username>"

How do I always connect to the most recent replica?How do I always connect to the most recent replica?

To connect to the most recent replica, use a special FQDN. It has this format: c-<cluster_ID>.ro.mdb.yandexcloud.net. When connected to this FQDN, you can perform only read operations.

Example of command for connection to a replica
psql "host=c-<cluster_ID>.ro.mdb.yandexcloud.net \
      port=6432 \
      sslmode=verify-full \
      dbname=<DB_name> \
      user=<username>"

If there are no active replicas in the cluster, this FQDN will point to the current master host.

How do I connect to the database?How do I connect to the postgres database?

postgres is a housekeeping database. For security reasons, you cannot connect to housekeeping databases.

How do I get the user's password?How do I get the postgres user's password?

For security reasons, you cannot get the postgres user's password nor connect to the database as that user.

Updating a clusterUpdating a cluster

Why did the cluster change its status to during an unscheduled backup?Why did the cluster change its status to Updating during an unscheduled backup?

The cluster changes its status to Updating right after the backup process is launched. You cannot cancel this operation. Wait for it to complete instead.

The time this operation is performed depends on a number of factors, such as DB size, cluster configuration, and the nature of data being stored. The average speed when recovering a cluster from a backup is about 100 Mbps.

Can I create two PostgreSQL databases at the same time?Can I create two PostgreSQL databases at the same time?

You cannot apply multiple transactions to a cluster at the same time. It is an architectural feature of the technologies utilized by Yandex Cloud.

Can I change the number of connections available to a user?Can I change the number of connections available to a user?

Yes, you can. To do this, change the values of the relevant settings:

  • Conn limit: Maximum number of host connections per user. The default is 50. The minimum is 10.
  • Max connections: Maximum number of connections reserved for all users. The default value is 200 × <number_of_vCPUs_per_host>. You have to keep in mind that this number includes 15 service connections, e.g., given a cluster with "max_connections": 100, you can reserve a maximum of 85 connections per cluster host for users.

Can I change the class of an existing host (standard, memory-optimized, burstable)?Can I change the class of an existing host (standard, memory-optimized, burstable)?

Yes, you can by following the procedure in Changing cluster settings.

Can I change the an existing cluster's disk type?Can I change the an existing cluster's disk type?

Yes, you can. To do this, restore the cluster from a backup and specify the desired disk type when configuring the new cluster.

Can I manage a cluster using SQL commands?Can I manage a cluster using SQL commands?

There are some restrictions for cluster management using SQL commands. For more information, see SQL command limits.

Can I create a database using SQL commands?Can I create a database using SQL commands?

No, you cannot create a database using SQL commands. In a Managed Service for PostgreSQL cluster, you can create databases only using Yandex Cloud interfaces.

How to recover a cluster from read-only mode?How to recover a cluster from read-only mode?

Follow the steps described in Recovering a cluster from read-only mode and Manually get the cluster out of the read-only mode.

Cluster parameter settingsCluster parameter settings

Is autovacuum enabled for all tables by default?Is autovacuum enabled for all tables by default?

Yes, AUTOVACUUM is enabled for all tables by default.

Autovacuuming does not run at a specific time. Instead, it runs when a certain value specified in the settings is reached, for example, when the share of updated or deleted table records becomes equal to the Autovacuum vacuum scale factor.

For more information, see the PostgreSQL documentation.

Which LC_COLLATE and LC_CTYPE values are set for databases by default?Which LC_COLLATE and LC_CTYPE values are set for databases by default?

As databases are created, LC_CTYPE=C and LC_COLLATE=C are set by default. You can't change these settings for the database you create with clusters. However, you can create a new database and set the values you need for it.

Can I change the LC_COLLATE and LC_CTYPE values?Can I change the LC_COLLATE and LC_CTYPE values?

You cannot change locale settings after you create a database. You can:

  • Create a new database with the desired settings.
  • Set a sorting locale (LC_COLLATE) for elements of an existing database:
    • When calling a function:
      SELECT lower(t1 COLLATE "ru_RU.utf8") FROM test;
      
    • When creating and updating a table:
      CREATE TABLE test (t1 text COLLATE "ru_RU.utf8");
      

Can I change the DB owner?Can I change the DB owner?

Once you create a DB, you cannot change its owner. If you create a DB via Terraform and then change its owner in the owner parameter, this will recreate the DB and its data will be lost.

Moving and restoring a clusterMoving and restoring a cluster

Can I restore a cluster backup to a running Managed Service for PostgreSQL instance in another cloud network?Can I restore a cluster backup to a running Managed Service for PostgreSQL instance in another cloud network?

Yes, you can switch to another cloud network when restoring a cluster from a backup.

Can I change the retention period for automatic backups?Can I change the retention period for automatic backups?

You can set the retention period for automatic backups during cluster creation or modification.

Do I need the wal2json plugin if I am only doing data replication and not copying?Do I need the wal2json plugin if I am only doing data replication and not copying?

Yes, you need this plugin even if you do not copy data.

Can I download a database backup to my local machine?Can I download a database backup to my local machine?

While Yandex Cloud service does not support local backup downloads, you can use the pg_dump utility as an alternative.

How do I move a local PostgreSQL database dump to Yandex Cloud?How do I move a local PostgreSQL database dump to Yandex Cloud?

Follow the steps described in this Migrating databases tutorial.

How do I migrate a database or a table from one cluster to another?How do I migrate a database or a table from one cluster to another?

You can migrate a database or a table using Data Transfer or pg_dump.

For more information on using Data Transfer for migration, see Database migration.

How do I transfer data between clusters in different folders or clouds?How do I transfer data between clusters in different folders or clouds?

You can transfer data using Data Transfer or pg_dump.

For more information on using Data Transfer for migration, see Database migration.

How do I move a cluster to another cloud?How do I move a cluster to another cloud?

You can move a cluster using Data Transfer or pg_dump.

For more information on using Data Transfer for migration, see Database migration.

How do I restore a backup to an existing cluster?How do I restore a backup to an existing cluster?

You can only restore a backup to a new cluster.

How do I restore a cluster to the state of the selected backup?How do I restore a cluster to the state of the selected backup?

You can only restore a backup to a new cluster.

Can I restore a single database from a backup?Can I restore a single database from a backup?

No, you cannot select specific databases. You can only restore the entire cluster with all its databases.

Users and rolesUsers and roles

Can I migrate users from a PostgreSQL source cluster to a Managed Service for PostgreSQL target cluster?Can I migrate users from a PostgreSQL source cluster to a Managed Service for PostgreSQL target cluster?

No, you cannot automatically migrate users from a third-party PostgreSQL cluster or a Managed Service for PostgreSQL cluster to a Managed Service for PostgreSQL cluster. You have to create users once again in the target cluster.

How to create a role using SQL queries?How to create a role using SQL queries?

You cannot create a role using SQL queries.

In PostgreSQL, a role is a database user or group of users. In Managed Service for PostgreSQL, you can create a user only via the management console, Yandex Cloud CLI, Terraform, or API. For more information about creating users, see this PostgreSQL guide.

You can assign user privileges, which decide the actions the user can perform with database objects.

High availability and load balancingHigh availability and load balancing

How to exclude a host from the master selection?How to exclude a host from the master selection?

You can exclude a host from the master selection when replacing the master host automatically or manually. To do this, set up cascade replication: specify a replication source for the host you want to exclude.

Warning

To ensure high availability during maintenance, your cluster must have at least one replica host without a replication source.

Why do I get an error when setting up cascading replication?Why do I get an error when setting up cascading replication?

Error message:

cluster should have at least 2 HA hosts to use cascade host

The error occurs if you specify a replication source for a single non-cascading replica.

To ensure high availability, your cluster must have at least one replica without a replication source. During maintenance or if the master host fails, this replica will take over as the master.

To learn more about replication, see this guide.

How do I always connect to the master host?How do I always connect to the master host?

To connect to the current master host, use a special FQDN. It has this format: c-<cluster_ID>.rw.mdb.yandexcloud.net. When connected to this FQDN, you will be able to perform read and write operations.

Example of command for connection to a master
psql "host=c-<cluster_ID>.rw.mdb.yandexcloud.net \
      port=6432 \
      sslmode=verify-full \
      dbname=<DB_name> \
      user=<username>"

How do I always connect to the most recent replica?How do I always connect to the most recent replica?

To connect to the most recent replica, use a special FQDN. It has this format: c-<cluster_ID>.ro.mdb.yandexcloud.net. When connected to this FQDN, you can perform only read operations.

Example of command for connection to a replica
psql "host=c-<cluster_ID>.ro.mdb.yandexcloud.net \
      port=6432 \
      sslmode=verify-full \
      dbname=<DB_name> \
      user=<username>"

If there are no active replicas in the cluster, this FQDN will point to the current master host.

Why did the master and the replicas switch places?Why did the master and the replicas switch places?

This means the master has failed over to the replica host. Failover ensures cluster availability during maintenance or if the master fails.

Use a special FQDN to always connect to the current master.

Warning

Use master host special FQDN-based connections only for processes that can cope with database being unavailable for writing for up to 10 minutes.

Can I configure multimaster in a cluster or between two clusters?Can I configure multimaster in a cluster or between two clusters?

No, Managed Service for PostgreSQL does not support multimaster configuration.

For more information on how to ensure high availability of a cluster, see High availability managed databases (MDB).

How do I configure load balancing so that read requests only go to replicas?How do I configure load balancing so that read requests only go to replicas?

As Managed Service for PostgreSQL does not perform any load balancing, you need to configure it in your application backend. To send read requests to replicas, the application must independently recognize master and replica hosts, e.g., using libpq. For more information, see this PostgreSQL article.

Alternatively, use a special FQDN that points to the most recent replica.

For more information, see High availability.

Why does the master fail over to a randomly selected host when autofailover is off?Why does the master fail over to a randomly selected host when autofailover is off?

Even with autofailover disabled, the master host may switch to another host during maintenance or cluster updates. This helps keep the cluster working correctly during these operations.

Note

To ensure high availability, the cluster always has at least one replica without an explicitly defined replication source. This replica can take over as master when needed.

Why does the cluster switch masters after recovery, even though autofailover is disabled?Why does the cluster switch masters after recovery, even though autofailover is disabled?

Even with autofailover disabled, the master host may switch to another host after recovery. This helps keep the cluster working correctly under such conditions. For more information, see High availability of a Managed Service for PostgreSQL cluster.

Why does the master fails over automatically during maintenance operations, even though autofailover is off?Why does the master fails over automatically during maintenance operations, even though autofailover is off?

Even with autofailover disabled, the master host may switch to another host to allow maintenance.

Monitoring and logsMonitoring and logs

Where can I track my use of disk space to avoid exceeding the 95% read-only limit?Where can I track my use of disk space to avoid exceeding the 95% read-only limit?

You can track your disk space:

  • In the management console using cluster status monitoring tools.
  • In Yandex Monitoring that allows you to set up alerts for specified metrics.

Are logs stored on the same disk as PostgreSQL data? How are they charged?Are logs stored on the same disk as PostgreSQL data? How are they charged?

Logs are stored on different disks than data and rotated automatically. You can view log information using the CLI command below:

yc managed-postgresql cluster list-logs <cluster_ID>

Cluster log storage is free of charge.

What is the retention period for logs?What is the retention period for logs?

Cluster logs are stored for 30 days.

What are WALs and what are they used for?What are WALs and what are they used for?

Write-Ahead Logs are used for writing data to the disk and for data replication. They are created with write requests and take up disk space until log data is written out to host disks to ensure DBMS reliability and fault tolerance.

For more information about PostgreSQL, see the official documentation.

What does the Cached parameter mean for PostgreSQL cluster host RAM monitoring?What does the Cached parameter mean for PostgreSQL cluster host RAM monitoring?

Cached stores cached data. Most operations are performed in random-access memory, since this is where all database information is stored. Caching is applied both to databases and to disks, which may cause the amount of cached data to exceed the storage size.

If the amount of RAM used by applications increases, some of the cache memory may be released.

For more information about caching disk data in Linux, see the documentation.

How do I get alerts on critical PostgreSQL cluster parameters?How do I get alerts on critical PostgreSQL cluster parameters?

Use Yandex Monitoring and set up alerts for the parameters critical for you.

How do I set up an alert that triggers as soon as a certain percentage of disk space has been used up?How do I set up an alert that triggers as soon as a certain percentage of disk space has been used up?

Create an alert with the disk.used_bytes metric in Yandex Monitoring. This metric shows the disk space usage in the Managed Service for PostgreSQL cluster.

For disk.used_bytes, use notification thresholds. The recommended values are as follows:

  • Alarm: 90% of the disk space
  • Warning: 80% of the disk space

Thresholds are set in bytes only. For example, the recommended values for a 100 GB disk are as follows:

  • Alarm: 96636764160 bytes (90%)
  • Warning: 85899345920 bytes (80%)

Error messagesError messages

Why do I get an error when using the TimescaleDB extension?Why do I get an error when using the TimescaleDB extension?

Error message:

SQL Error [0A000]: ERROR: functionality not supported under the current "apache" license
Hint: Upgrade your license to 'timescale' to use this free community feature.

This error occurs when you attempt to use a function available only in TimescaleDB Community Edition.

The community edition is distributed under the Timescale license (TSL). Clause 2.2 of the license prohibits using TimescaleDB Community Edition to provide DbaaS (Database as a Service) services, so this version is not available in Yandex Cloud.

The version installed in a Managed Service for PostgreSQL cluster is TimescaleDB Apache 2 Edition, and its features are limited compared to the community version.

What should I do if I get a revocation check error when using PowerShell to obtain an SSL certificate?What should I do if I get a revocation check error when using PowerShell to obtain an SSL certificate?

Here is the full text of the error:

curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012)
The revocation function was unable to check revocation for the certificate

This means, when connecting to the website, the service was unable to check whether or not its certificate was listed among revoked ones.

To fix this error:

  • Make sure the corporate network settings do not block the check.

  • Run the command with the --ssl-no-revoke parameter.

    mkdir $HOME\.postgresql; curl.exe --ssl-no-revoke -o $HOME\.postgresql\root.crt https://storage.yandexcloud.net/cloud-certs/CA.pem
    

What should I do if I get the error when connecting?What should I do if I get the SSL is required error when connecting?

The error occurs because you are trying to connect to the cluster with a public host. These hosts only support connections with an SSL certificate. However, you can:

  • Obtain an SSL certificate and add it to the application you are using to connect to the cluster.
  • Disable public access to hosts and connect to the cluster from a VM located in the same cloud network.

What should I do if I get the error when connecting?What should I do if I get the too many active clients for user error when connecting?

Connecting to cluster hosts may fail with the following error:

too many active clients for user (pool_size for user <username> reached <limit_value>)

By default, a cluster reserves 50 connections per host for each user. If the connection limit per user is reached, any attempt to establish a new connection will fail with an error.

Solution: Increase the connection limit in the Conn limit setting.

For instructions on updating PostgreSQL settings at the user level, see this guide.

Why do I get an error when connecting to a custom database?Why do I get an error when connecting to a custom database?

Connecting to a custom database may fail with the following error:

ERROR: odyssey: ce3ea075f4ffa: route for '<DB_name>.<username>' is not found

The error means that the connection parameters contain an invalid database name.

Why do I get an error when creating a dump using pg_dumpall?Why do I get an error when creating a dump using pg_dumpall?

You get this error when creating a dump using pg_dumpall:

ERROR: odyssey: c16b9035a1f78: route for 'template1.<username>' is not found

This error is there because pg_dumpall tries to export all databases: both custom and system ones.

You cannot create a dump of all Managed Service for PostgreSQL databases at the same time. Export dumps using pg_dump for each custom database one by one, excluding the system ones.

Why do I get an error when connecting to a postgres database?Why do I get an error when connecting to a postgres database?

Connecting to the postgres database fails with the following error:

ERROR: odyssey: c76e2c1283a7a: route for 'postgres.<username>' is not found

postgres is a system database; connecting to it is prohibited in Managed Service for PostgreSQL. Specify a different database in the connection parameters.

Why does a connection terminate with ?Why does a connection terminate with terminating connection due to administrator command?

A Managed Service for PostgreSQL cluster connection may be terminated with the following message:

FATAL: terminating connection due to administrator command

This message does not indicate an error, it means that the session/transaction duration has exceeded the Session duration timeout setting value (default value: 12 hours).

Why cannot I connect to cluster hosts?Why cannot I connect to cluster hosts?

Connecting to cluster hosts may fail with the following error:

could not translate host name "<regular or special FQDN>" to address: Name or service not known

This error occurs if public access to the host is denied or users are using custom DNS servers that do not allow domain names in the mdb.yandexcloud.net zone.

Solution:

  • Enable public access for the host you are connecting to. When using a special FQDN, enable public access for the host the special FQDN points to.

    Warning

    Use master host special FQDN-based connections only for processes that can cope with database being unavailable for writing for up to 10 minutes.

  • We recommend that you enable public access for all cluster hosts. This will avoid connection errors during automatic master failover.

  • For custom DNS servers, configure DNS forwarding for the mdb.yandexcloud.net zone.

Why cannot I stop a cluster?Why cannot I stop a cluster?

Error message:

ERROR: rpc error: code = FailedPrecondition desc = Cluster has no backups

A cluster that has no backups cannot be stopped. To fix the error and stop the cluster, create its backup.

Why do I get the error when modifying a cluster?Why do I get the max_connections is less than sum of users connection limit error when modifying a cluster?

This error may occur when downgrading a host class in a cluster if the sum of connection limits for all users is less then the total cluster connection limit (Max connections).

Solution: First reduce the limits set for users so their sum is less than <Max_connections_value> — 15 and then proceed with host class downgrade.

Why does a data transfer through creating and restoring a logical dump fail with an error?Why does a data transfer through creating and restoring a logical dump fail with an error?

Restoring a logical dump may fail with one of the following errors:

  • ERROR: role "<source_username>" does not exist
  • ERROR: must be member of role "<source_username>"

The errors occur because the target cluster does not have the user (or the privileges of the user) who created the logical dump in the source cluster.

To resolve the errors:

  1. In the target cluster, add a user with access to the migrated database and the same name as the user who created the logical dump in the source cluster.
  2. As this user, restore the logical dump or grant their privileges to another account you want to use to restore the logical dump.

What should I do if I get the error when performing logical replication?What should I do if I get the replication slot already exists error when performing logical replication?

By default, when you create a subscription, a replication slot is also created. The replication slot already exists error means that a replication slot already exists.

You can fix this error by doing one of the following:

  1. Link your subscription to an existing replication slot. To do this, add the create_slot = false parameter to the request to create a subscription.
  2. Delete the existing replication slot and try creating the subscription again.

Why do I get an error when migrating my DB to Managed Service for PostgreSQL?Why do I get an extension... is not available error when migrating my DB to Managed Service for PostgreSQL?

Error message:

extension "<extension_name>" is not available

You may get this error when migrating a DB to Managed Service for PostgreSQL with a script attempting to install and use the PostgreSQL extension. The reason for the error is that in Managed Service for PostgreSQL clusters, you cannot use SQL commands to manage PostgreSQL extensions.

To avoid this error:

  1. If the script or logical dump is in text format, remove the operators for creating PostgreSQL extensions from them.
  2. Install all required extensions in the target database using the Yandex Cloud interfaces.

Why do I get the error when deploying a logical dump?Why do I get the must be owner of extension error when deploying a logical dump?

Restoring a logical dump may fail with this error: ERROR: must be owner of extension.

The error is there because the logical dump contains installation or update operations of PostgreSQL extensions. In Managed Service for PostgreSQL clusters, you cannot manage extensions using SQL commands.

To fix this error:

  1. Before restoring the dump, enable all required extensions in the target database.
  2. Exclude any operations with extensions from the dump. For example, you can comment out lines related to installation of extensions.
  3. Perform logical dump recovery again.

Why do I get an error when setting up cascading replication?Why do I get an error when setting up cascading replication?

Error message:

cluster should have at least 2 HA hosts to use cascade host

The error occurs if you specify a replication source for a single non-cascading replica.

To ensure high availability, your cluster must have at least one replica without a replication source. During maintenance or if the master host fails, this replica will take over as the master.

To learn more about replication, see this section.

Why do I get the error?Why do I get the cannot execute <SQL_command> in a read-only transaction error?

Error options:

ERROR: cannot execute ALTER EXTENSION in a read-only transaction
ERROR: cannot execute CREATE TABLE in a read-only transaction
ERROR: cannot execute UPDATE in a read-only transaction
ERROR: cannot execute INSERT in a read-only transaction

Such errors can occur after master failover if you connected to a read-only replica.

To prevent such errors, use any of the following ways:

  • Connect to the cluster using a special FQDN that always points to the current master.

    Warning

    Use master host special FQDN-based connections only for processes that can cope with database being unavailable for writing for up to 10 minutes.

  • When connecting, specify the target_session_attrs=read-write parameter and list all cluster hosts. This way, you will connect to the master host with read and write access.

For more information on how to connect to the master host, see Connecting to a database.

What should I do if logs display the error?What should I do if logs display the too many connections for role "monitor" error?

The monitor user is reserved for monitoring purposes in a Managed Service for PostgreSQL cluster. You can ignore too many connections warnings for this user.

Why do I get an error when trying to install multiple extensions in the CLI?Why do I get an error when trying to install multiple extensions in the CLI?

Installing multiple extensions in the CLI may fail with one of these errors:

  • ERROR: accepts 1 arg(s), received 2

    This error may occur due to an incorrect command format.

    Solution: Make sure to list the extensions with no spaces in between. Here is an example:

    yc managed-postgresql database update db1 --cluster-id cat0adul1fj0******** --extensions cube,pg_logic,timescaledb
    
  • ERROR: rpc error: code = InvalidArgument desc = Invalid extensions '<extension_name>', allowed extension: <extension_list>

    You may get this error if an extension in the list is incompatible with the PostgreSQL version in the cluster.

    Solution: Check the compatibility of the extensions specified in the command in the list of supported extensions.

  • ERROR: rpc error: code = InvalidArgument desc = The specified extension '<extension_name>' is not present in shared_preload_libraries

    This error may occur if the cluster does not contain the required shared library.

    Solution: Check the shared library requirements in the list of supported extensions. To add the required library, when updating the PostgreSQL cluster settings, specify its name in the Shared preload libraries parameter.

Was the article helpful?

Previous
Error messages
© 2025 Direct Cursus Technology L.L.C.