Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
All solutions
    • All solutions for Managed PostgreSQL
    • Recovering a Managed Services for PostgreSQL cluster after its disks become Read Only
    • You are unable to delete your Managed Service for PostgreSQL cluster in the Dead status if deletion protection was enabled for it
    • Managed Service for PostgreSQL cluster switches to the Unknown state immediately after creation
    • Resolving issues with updating configurations of clusters with local-ssd disks
    • Resolving the consequences of cluster storage overflow with WAL logs
    • Resolving the psql error "could not translate host name to address nodename nor servname provided, or not known"
    • Resolving the error Unrecognized configuration parameter "stats_temp_directory"
    • Resolving the "max_connections conn_limit is too high" error
    • Resolving the "422 UNPROCESSABLE ENTITY The specified extension <'ext_name'> is not present in shared_preload_libraries" error
    • Understanding the Conn limit parameter
    • How to set up SQL query filtering
    • How to enable SQL query logging

In this article:

  • Issue description
  • Solution
  1. Managed PostgreSQL
  2. Resolving the consequences of cluster storage overflow with WAL logs

Resolving the consequences of cluster storage overflow with WAL logs

Written by
Yandex Cloud
Updated at November 27, 2023
  • Issue description
  • Solution

Issue descriptionIssue description

You see one or more of the following issues in the operation of your Managed Services for PostgreSQL cluster:

  • As a result of Yandex Data Transfer operation, the database storage has been overflown.
  • The number of replication slots for the cluster has been exceeded.
  • New data is not written to your cluster's database tables.

SolutionSolution

The error might occur due to issues with replication slots when Yandex Data Transfer performs operations with cluster databases.

Each running transfer creates a replication slot in the database.
A replication slot is a pointer to a position in the WAL log. If the slot is not in use, the position in the log does not change.
If data from this slot has not been read for some reason, the size of the WA log continues to increase until the free space in the cluster storage runs out, or the Max slot wal keep size parameter is exceeded.

You can find out which replication slots are open in the database by connecting to one of the cluster databases using psql and running this query: select * from pg_replication_slots where slot_type = 'logical';.

Example output of the select * from pg_replication_slots where slot_type = 'logical'; command
```sql
select * from pg_replication_slots where slot_type = 'logical';
-[ RECORD 1 ]-------+---------------------
slot_name           | dtt7v7vbpuogkku0oce9
plugin              | wal2json
slot_type           | logical
```

If the plugin field in the logical replication slot has the wal2jsonvalue, it means that Data Transfer is currently interacting with the databases of this cluster.
Possibly, an error occurred during the transfer process for one or more replication slots.
Try deleting replication slots using the select pg_drop_replication_slot('$REPLICATION_SLOT_NAME'); command, where $REPLICATION_SLOT_NAME is the name of the stuck replication port (in the example provided above, it is dtt8d6vbqjdikau1oaq1).

If upon deletion of the replication slot you see this error: replication slot "$REPLICATION_SLOT_NAME" is active for PID $PID_NUM, try stopping the transfer on the Data Transfer side or delete the involved endpoint from the transfer parameters.

Example output of the select pg_drop_replication_slot('$REPLICATION_SLOT_NAME'); command:
db-name=> select pg_drop_replication_slot('$REPLICATION_SLOT_NAME');
ERROR: replication slot "$REPLICATION_SLOT_NAME" is active for PID 12345

You can also specify the maximum size of the WAL log, after which the Data Transfer operation will be stopped. To do this, change the value of the Max slot wal keep size parameter. If the size of your database's WAL log exceeds the size specified in this parameter, the transfer will stop.
This will prevent filling up all the free space in the cluster storage.

After an error (or successful completion of transfer), the WAL log is deleted, and the storage space occupied by it is freed up.
If the transfer does not successfully complete after changing the Max slot wal keep size parameter, increase the cluster storage following this guide.

You can learn more about the operation of replication slots from the PostgreSQL developer documentation.

Was the article helpful?

Previous
Resolving issues with updating configurations of clusters with local-ssd disks
Next
Resolving the psql error "could not translate host name to address nodename nor servname provided, or not known"
© 2025 Direct Cursus Technology L.L.C.