vitabaks/autobase

ERROR: could not create replication slot

Closed this issue · 1 comments

I'm doing synch replication with pg_easy_replicate utility.
I have 10 slots:

postgres=# show max_replication_slots;
max_replication_slots

10
(1 row)
And 8 of is avalaible:
postgres=# SELECT
(SELECT setting::int FROM pg_settings WHERE name = 'max_replication_slots') - COUNT(*) AS available_slots
FROM
pg_replication_slots;
available_slots

          8

(1 row)

but despite this I get the following error:
tail -f /var/log/postgresql/postgresql-Sat.log
...
2024-11-30 10:55:30 +05 [881547-3] ERROR: could not create replication slot "pg_22521_sync_17060_7442929061963593356": ERROR: all replication slots are in use
HINT: Free one or increase max_replication_slots.
2024-11-30 10:55:30 +05 [841370-5706] LOG: background worker "logical replication worker" (PID 881547) exited with exit code 1
2024-11-30 10:55:30 +05 [881548-1] LOG: logical replication table synchronization worker for subscription "pger_subscription_database_cluster", table "hospitalization_redirections" has started
2024-11-30 10:55:30 +05 [881548-2] LOG: could not drop replication slot "pg_22521_sync_17068_7442929061963593356" on publisher: ERROR: replication slot "pg_22521_sync_17068_7442929061963593356" does not exist
2024-11-30 10:55:30 +05 [881548-3] ERROR: could not create replication slot "pg_22521_sync_17068_7442929061963593356": ERROR: all replication slots are in use
...

How to solve this error? Please help!

It was archive_command misconfiguration