Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • 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
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
All solutions
    • All solutions for Managed Service for PostgreSQL
    • Restoring a Managed Service for PostgreSQL cluster after running out of free storage space
    • You are unable to delete your Managed Service for PostgreSQL cluster in the `DEAD` status if it has deletion protection enabled
    • Managed Service for PostgreSQL cluster switches to `UNKNOWN` once created
    • Resolving issues with updating configurations of clusters with `local-ssd` disks
    • Resolving the issue 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` error
    • Resolving the `Unrecognized configuration parameter stats_temp_directory` error
    • Resolving the `max_connections conn_limit is too high` error
    • Resolving the `Must be superuser to create this extension` error
    • Fixing the `terminating connection due to administrator command` and `ERROR: odyssey: remote server read/write error` errors
    • Resolving the `422 UNPROCESSABLE ENTITY The specified extension <'ext_name'> is not present in shared_preload_libraries` error
    • How `Conn limit` works
    • How to set up SQL query filtering
    • How to enable SQL query logging

In this article:

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

Resolving the consequences of cluster storage overflow with WAL logs

Written by
Yandex Cloud
Updated at December 17, 2025
  • Issue description
  • Solution

Issue descriptionIssue description

Your Managed Service for PostgreSQL cluster encountered one or multiple issues listed below:

  • A Data Transfer caused the database storage overflow.
  • The number of replication slots for the cluster is exceeded.
  • New data is not written to your cluster's database tables.

SolutionSolution

Errors may occur because of issues with replication slots when Data Transfer performs operations with your cluster databases.

Each running transfer creates a replication slot in the database. A replication slot points 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 WAL log continues to increase until the free space in the cluster storage runs out, or the Max slot wal keep size value 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 of the SELECT * FROM pg_replication_slots WHERE slot_type = 'logical'; command output
```sql
SELECT * FROM pg_replication_slots WHERE slot_type = 'logical';
-[ RECORD 1 ]-------+---------------------
slot_name           | dtt*****************
plugin              | wal2json
slot_type           | logical
```
  • If the plugin field in the logical replication slot has the wal2json value, it means that Data Transfer is currently working with the databases of this cluster.

  • If an error occurred during the transfer process for one or more replication slots, delete the slot by using the SELECT pg_drop_replication_slot('$REPLICATION_SLOT_NAME'); command, where $REPLICATION_SLOT_NAME is the name of the stuck replication slot. In the example above, it is dtt*****************.

  • If after deleting the replication slot you see the replication slot "$REPLICATION_SLOT_NAME" is active for PID $PID_NUM error, try stopping the transfer on the Data Transfer side or delete the involved endpoint from the transfer parameters.

Example of the select pg_drop_replication_slot('$REPLICATION_SLOT_NAME'); command output
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 reaching which Data Transfer will stop. To do this, edit the Max slot wal keep size value. If the size of your database's WAL log exceeds this value, the transfer will stop. This will prevent filling up all free space in the cluster storage.

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

You can learn more about the operation of replication slots in the PostgreSQL developer guide.

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` error
© 2025 Direct Cursus Technology L.L.C.