Migrating Azure Database for PostgreSQL Elastic Cluster (single-node, no sharding) to Single Server/Flexible Server — recommended path + role/password migration

Aashay Thakkar 0 Reputation points
2026-08-12T10:21:11.3+00:00

We have an Azure Database for PostgreSQL - Elastic Cluster running as a single node — we don't use or require Citus/sharding features. We need to migrate this to a standard (non-elastic) Postgres server, ultimately to end up on Postgres 17 (see our related question here: [link to Post 1]).

Questions:

  1. What's the Microsoft-recommended/supported path to migrate an Elastic Cluster's data to Single Server or Flexible Server — native pg_dump/pg_restore against the coordinator, Azure Database Migration Service, or something else?
  2. How do we migrate Postgres roles along with their password hashes (not resetting passwords) given Azure's managed role model (no true superuser, restricted access to pg_authid)? Specifically: does pg_dumpall --globals-only work against an Elastic Cluster coordinator, and are there Azure-reserved roles we need to exclude before restoring on the target to avoid conflicts?

Any guidance or gotchas specific to Elastic Cluster → Flexible Server migrations would help.

Azure Database for PostgreSQL

1 answer

Sort by: Most helpful
  1. Smaran Thoomu 415 Reputation points Microsoft External Staff Moderator
    2026-08-18T18:24:35.1066667+00:00

    Hi @Aashay Thakkar

    Peram has covered the main migration path and the limitation around migrating password hashes. I would also like to highlight a few additional considerations for the migration:

    • Since the target is PostgreSQL 17 Flexible Server, make sure the PostgreSQL client utilities used for the migration are compatible with the target version.
    • For a single-node Elastic Cluster where Citus/sharding isn't being used, verify that there are no distributed tables or Citus-dependent objects before removing Citus-related dependencies.
    • Elastic Cluster migration documentation currently supports logical migration using pg_dump/pg_restore or pgcopydb.
    • Server-level settings/parameters should be reviewed separately because they aren't automatically carried over as part of a database dump. They should be compared and configured on the target as required.
    • Users and roles need separate consideration during migration. Azure Database for PostgreSQL Flexible Server has managed service roles and does not provide customer access to the PostgreSQL superuser.
    • As already mentioned, password hashes cannot be migrated from Flexible Server, so application/service credentials should be planned for reset or rotation during cutover.
    • Before production cutover, validate the restored databases, extensions, users/roles, permissions, application connectivity, and any required server parameters.
    • If HA or read replicas are required on the new Flexible Server, it is recommended to enable them after the migration and validation are completed.

    For testing, it would also be useful to perform a dry run/non-production migration first and validate the application workload before the final cutover

    References:

    I hope this helps. Please let me know if you have any questions.

    Was this answer helpful?

    0 comments No comments

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.