How to Fix Activate Stuck with Creating Replication Slot in PostgreSQL Source Location

Documentation: How to Fix Activate Stuck with Creating Replication Slot in PostgreSQL Source Location

How to Fix Activate Stuck with Creating Replication Slot in PostgreSQL Source Location

Issue

When you activate the channel, the job may remain stuck in the Running state on a PostgreSQL source location.

Environment

DSS 6

Resolution

To reduce the chances of Activate Replication remaining stuck due to database lock contention, we recommend that you activate the channel during off-peak or outside-business hours, when the PostgreSQL source database is less busy.

Run the following query, or use the Lock Manager database management tool, to check whether replication slot creation is blocked:

SELECT * FROM pg_stat_activity WHERE query LIKE '%pg_create_logical_replication_slot%';

Cause

This issue occurs when replication slot creation is blocked and is waiting for other database processes or locks to be released.