You need to enable JavaScript to run this app.
RDS for PostgreSQL

RDS for PostgreSQL

Copy page
Download PDF
WAL management
About replication slots
Copy page
Download PDF
About replication slots
Replication slot is a unique mechanism of PostgreSQL database, which is used to avoid data loss or duplicate replication in streaming replication and improve the reliability of data replication.​
  • Types of replication slots​
  • Replication slots are divided into physical replication slots and logical replication slots according to their types.Replication slots are divided into physical replication slots and logical replication slots based on their type.​
  • Physical replication slots are generally used in conjunction with streaming replication to prevent WAL logs required by the standby database from being deleted in the primary database, ensuring that the primary database will not delete WAL logs before all standby databases receive WAL logs. The primary database will confirm the WAL logs that are no longer needed based on the information returned by the standby database, and then clean them up.​
  • Logical replication slot is a WAL parsing function provided by PostgreSQL itself, which is used to record and switch transactions to ensure that transactions are not lost or resent.​
  • Status of replication slot​
  • Replication slots have two states: ACTIVE and INACTIVE. When there are too many inactive logical replication slots due to not being cleaned up in time, WAL logs will continue to accumulate, occupying a large amount of storage space, and may even fill up the disk, causing the instance to be locked and unable to write data, thus affecting the business. RDS for PostgreSQL supports deleting inactive replication slots through the console or Open API to reduce the disk space occupied by WAL logs. For more details on cleaning up replication slots, see Deleting replication slots. RDS for PostgreSQL supports viewing replication slots under instances via the console or Open API. For more details on viewing instance replication slots, refer to Viewing the replication slot list.​
Last updated: 2025.11.17 16:15:07