Share via

Azure postgre sql mirroring does not install cdc extension in one of the db

Gediminas 25 Reputation points
2025-08-25T10:48:25.8733333+00:00

Mirroring on the postgresql db does not install cdc extension which does not allow mirroring to be enabled

in default db named postgres it isntalls but in our other db it does not. Anyone have an idea why it can be like this ? We using the preview function and doing everythign what it says in microsoft learn

Azure Database for PostgreSQL
0 comments No comments

2 answers

Sort by: Most helpful
  1. Gediminas 25 Reputation points
    2025-09-04T09:53:36.7133333+00:00

    Server parameters was like this:

    wal_level → set to logical

    • azure.extensionspg_stat_statements is enabled. azure_cdc is not available to set, as we understand it should normally be installed during the preparation wizard. A manual installation attempt caused server errors and prevented connections, so a rollback was required.
    • shared_preload_libraries → set to pg_stat_statements, azure_cdc is not availiable as its not installed

    max_worker_processes → set to 16

    Was this answer helpful?

    1 person found this answer helpful.

  2. Amira Bedhiafi 42,046 Reputation points MVP Volunteer Moderator
    2025-08-25T12:12:20.28+00:00

    Hello Gediminas !

    Thank you for posting on Microsoft Learn.

    The CDC bit isn’t global as Fabric mirroring preview adds the azure_cdc extension per database, and only for the databases you select in the Azure portal mirroring enablement flow. If it shows up in postgres but not in your user DB, it usually means that DB wasn’t included (or your server doesn’t meet a preview limitation), so the extension wasn’t registered there.

    On the same flexible server:

    • PostgreSQL version must be 14–17
    • Compute tier must not be burstable (GP/MO only)
    • High availability must be off.
    • No read replicas (and not a primary that has replicas).

    If any of these are true, the mirroring workflow will skip registering azure_cdc in your DB. https://learn.microsoft.com/en-us/fabric/database/mirrored-database/azure-database-postgresql-limitations

    You can rerun the mirroring enablement flow and include the right DB

    In the Azure portal, go to your Azure Database for PostgreSQL Flexible Server under Fabric mirroring (preview) then Get started:

    • The page checks prerequisites and lets you select which databases to enable.
    • Select your user DB (not just postgres) then click prepare then accept the restart.

    This flow preloads and registers azure_cdc only for the selected databases and bumps needed server params. https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-fabric-mirroring

    By default you can mirror up to 3 databases per server. If you need more, increase azure_cdc.max_fabric_mirrors on the server first, then rerun the flow.

    https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-fabric-mirroring

    You can check if the extension is registered in that specific database:

    -- Is the extension even available on the server?
    SELECT * FROM pg_available_extensions WHERE name = 'azure_cdc';
    
    -- Is it installed in THIS database?
    SELECT * FROM pg_extension WHERE extname = 'azure_cdc';
    
    -- Did the workflow set logical WAL?
    SHOW wal_level;
    

    If pg_extension returns no row for azure_cdc in your DB, it wasn’t registered there then go back to step 2.

    Once installed, you’ll also see the azure_cdc schema and can use the troubleshooting UDFs like azure_cdc.tracked_publications() and azure_cdc.tracked_batches().

    Was this answer helpful?

    1 person found 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.