Azure Database for PostgreSQL: Logical Replication Slot Synchronization Issue After HA Deployment

Alex Kutner 0 Reputation points
2026-09-28T18:33:36.85+00:00

Problem description

I am using Azure Database for PostgreSQL flexible server in the Central US region with PostgreSQL 16.15, configured for zone-redundant high availability. I have set up logical replication for a downstream CDC consumer using the pgoutput plugin. Despite the server reporting as healthy and HA functioning correctly, the synchronization metric for my logical replication slot has remained at 0 for approximately 14 hours. Production traffic and CDC operations are ongoing, but I am concerned about the lack of confirmation that the replication slot has synchronized after failover.

Environment

Azure Database for PostgreSQL flexible server, Central US, PostgreSQL 16.15, SKU: GP_Standard_D8ds_v5, Storage: 1 TiB, zone-redundant HA, primary zone: 3, standby zone: 1, logical replication via pgoutput.

What I've already tried

I reviewed the Azure documentation on logical replication and HA, confirming that PostgreSQL 16 supports slot preservation across failover when configured correctly. I verified that 'hot_standby_feedback' is enabled, checked the slot synchronization metric in Monitoring over the past 24 hours, and reviewed the PostgreSQL logs around the restart window for any replication or slot-sync errors. I also confirmed that the logical replication slot existed before enabling HA and that no slot recreation has been performed, as that is not supported at this time.

Current status

Currently, the HA status remains healthy, and production traffic along with CDC is functioning normally. However, the logical replication slot's sync metric has remained at 0 for about 14 hours. I seek guidance on how to diagnose why the slot is not synchronized and whether there are additional configuration steps or log investigations needed to resolve this issue.

Azure Database for PostgreSQL
0 comments No comments

1 answer

Sort by: Oldest
  1. Maraiah Kasetti (Wipro Limited) 85 Reputation points Microsoft External Staff Moderator
    2026-09-29T10:23:36.0633333+00:00

    Hello @Alex Kutner ,

    Thank you for contacting Microsoft support. I understand the urgency of resolving this issue, and I am committed to helping you find a solution as quickly as possible.

    After reviewing everything you provided, here's what we know:

    The key issue is the PostgreSQL version. On PostgreSQL 16 and earlier, logical replication slots are not automatically preserved or synchronized to the HA standby. Native slot synchronization with sync_replication_slots is available only starting with PostgreSQL 17. For PostgreSQL 16, Azure requires the pg_failover_slots extension together with supporting configuration such as hot_standby_feedback = on

    Therefore, a slot sync metric staying at 0 is expected if only hot_standby_feedback was enabled but pg_failover_slots was not fully configured. Healthy HA and working CDC confirm that the current primary and consumer are operational, but they do not prove that the slot exists on the standby and will survive promotion.
    Required Server Settings: -
    <<SQL>>
    SHOW server_version;

    SHOW wal_level;

    SHOW hot_standby_feedback;

    SHOW shared_preload_libraries;

    SHOW max_replication_slots;

    SHOW max_wal_senders;

    Ref: -
    https://learn.microsoft.com/en-us/azure/postgresql/high-availability/concepts-high-availability
    https://learn.microsoft.com/en-us/azure/postgresql/extensions/concepts-extensions-considerations
    https://learn.microsoft.com/en-us/azure/postgresql/configure-maintain/concepts-logical

    Regards

    Maraiah

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.