On Thu, Jun 12, 2025 at 4:08 PM Perumal Raj wrote:
> Hi Community,
>  
> I have installed postgres version 17.5 with following setup,
>  
> Primary 
>        -- Secondary A
>        -- Secondary B
>                  -- Secondary C
>  
> Config:
> wal_level = 'logical'
> max_wal_senders = '10'
> max_replication_slots = '10'
> wal_keep_size = '512MB'
> hot_standby = 'on'
> sync_replication_slots = 'on'
> hot_standby_feedback = 'on'
> synchronized_standby_slots = 'Kafka_logical_slot'
>  
>  
> 1. slotsync worker is running all the time ( Automatic sync)
> 2. When I create logical replication slot(Kafka_logical_slot) in Primary, it
>    got synced on both Secondary A and > Secondary B
> 3. It didn't appear in Secondary C , Since its not direct replica.
>  
> Issue : When I stop Primary node and promote one of the Direct secondary
> (A,B) node. logical replication slot is vanished.
>  
> Am I missing any configuration ?
>  
> Please share your experience.

Thanks for reporting.

To narrow down potential causes, please confirm the following:

1) One possibility is that the slot has not been successfully synchronized to
   the standby. To verify, check for the presence of the following log message:

LOG:  newly created replication slot "your_slot" is sync-ready now

If this message is absent, it indicates that the slot has not been successfully
synced. Additionally, you can confirm the sync status by inspecting the
pg_replication_slots.temporary field on the standby; a value of true suggests
that the slot sync has not completed.

2) We typically recommend specifying the primary_slot_name on the standby to
   prevent slot invalidation due to catalog row removal on the primary. Please
   check your logs for possible invalidation messages:

LOG:  invalidating obsolete replication slot "your_slot"
or
LOG:  terminating process 12344 to release replication slot "your_slot"

3) Is there a chance that the slot was dropped on the primary before stopping
   it and promoting the standby? If so, the synced slot would also be dropped
   in this scenario.

Best Regards,
Hou zj

Reply via email to