Comment on page
UP20050 Reached PostgreSQL Replication Slots Limit
Upsolver cannot create an ingestion job from the given PostgreSQL database because the max replication slot limit has been reached.
To solve this issue, unused replication slots can be removed or the replication slot limit can be increased.
Be careful not to remove a replication slot that is in use as it will prevent the current consumer of the slot from making progress. Ensure the consumer is finished reading before removing replication slots.
Use the following query to list the current replication slots in the database:
SELECT * FROM pg_catalog.pg_replication_slots;
Replication slots created within Upsolver ingestion job statements are prefixed with
upsolver_. Replication slots from other systems will have different names. If you find old replication slots that you want to drop, run the following command to drop them:
Replication slots created by Upsolver will automatically be deleted by Upsolver when deleting the ingestion job. Directly deleting the replication slot will break the ingestion job that is using it.
If there are no unused replication slots you can drop, you can increase the replication slot limit by modifying the
max_replication_slots. The current value can be found by running the following query:
SELECT setting FROM pg_settings WHERE name in ('max_replication_slots');
After modifying the option group, you will need to restart your PostgreSQL instance by navigating to the RDS instance. Follow steps 1 to 3 in the AWS RDS for PostgreSQL tab below, click on the Actions button, and then click Reboot.
AWS RDS for PostgreSQL
In most self-hosted PostgreSQL databases, the configuration file will be placed in
- 1.Open the config file in an editor of your choice.
- 2.Check if a configuration value for max_replication_slots exists. If the value exists, update it to the new value, otherwise, add a new row at the end of the file as
max_replication_slots = <DESIRED_LIMIT>.
<DESIRED_LIMIT>with the new limit for replication slots.
Restart the database so changes take effect.
- 1.Open the RDS Service in the Amazon Web Services Console.
- 2.Navigate to Databases.
- 3.Find the database that you want to modify and click on its Database Identifier.
- 4.Navigate to the Configuration tab.
- 5.Click on the value of DB Instance Parameter Group.
- 6.In the Filter parameters input, type
- 7.Click on the checkbox before the name of the parameter
max_replication_slotsin the table and click Edit Parameters.
- 8.Change the value to the new limit of replication slots.
After modifying the option group, you will need to restart your PostgreSQL instance by navigating to the RDS instance. Follow steps 1 to 3, click on the Actions button, and then click Reboot.