Help Center/ DataArts Studio/ FAQs/ DataArts Migration (Real-Time Jobs)/ What Should I Do If a Job with PostgreSQL/GaussDB as the Source Fails to Be Started and Error "replication slot "xxx" is already active" Is Reported?
Updated on 2025-11-17 GMT+08:00

What Should I Do If a Job with PostgreSQL/GaussDB as the Source Fails to Be Started and Error "replication slot "xxx" is already active" Is Reported?

Symptom

A real-time job with PostgreSQL/GaussDB as the source fails to be started and error "replication slot "xxx" is already active" is reported.

Possible Causes

PostgreSQL/GaussDB data synchronization depends on logical replication slots. If a replication slot is used by a real-time job, it cannot be used by other jobs.

Solution

  1. Find the job that is using the replication slot based on the job ID in the replication slot name suffix. If the job can be stopped, stop it and restore the job that reports the error.

    The replication slot name is in migration_Job ID format. You can obtain the job ID on the real-time migration job monitoring page.

    • Method 1
      Figure 1 Viewing the job ID
    • Method 2
      Figure 2 Viewing the job ID
  1. Use an idle or a new replication slot.
    • Run the following command to query the replication slot status:
      select slot_name, active from pg_replication_slots

      If the value of active is false, the replication slot is idle. Otherwise, the replication slot is working.

      In normal cases, the replication slot used by each job is unique because each job has a unique ID. However, if a custom replication slot is used, conflicts may occur.

    • Customize a replication slot.
      Figure 3 Customizing a replication slot