Questions regarding migrating PostgreSQL databases from Tenant A to Tenant B

Pim Beliën 20 Reputation points
2025-10-13T15:28:47.77+00:00

Hi,

I have to migrate all databases that are currently hosted on 1 Azure Database for PostgreSQL flexible server on one Tenant, to multiple different servers on another tenant. As suggested i would prefer to use the Database Migration service, but I am having a few doubts on the requirements and limitations.

  1. I want to doublecheck if I can I indeed just slowly migrate database by database to a target new server. For example From the Source (lets call it server X) on Tenant A, i choose DB 1 and 2 and migrate those to the Target server Y server on Tenant B. After that I choose DB 3 and 4 and migrate those to Target server Z. Is the migration service indeed capable of this?
  2. None of the scenarios described in https://learn.microsoft.com/en-us/azure/postgresql/migrate/migration-service/overview-migration-service-postgresql match with what I have. I have a Azure Database for PostgreSQL flexible server to Azure Database for PostgreSQL flexible server. Does that change anything? Would I need a migration runtime server in between still?
  3. The source and the target PostgreSQL servers will all be in different VNETs and VNET peering will NOT be possible and both the source and target will have Private Endpoints. How do i establish a networking connection between source ant target in this case. It does not become clear from https://learn.microsoft.com/en-us/azure/postgresql/migrate/migration-service/how-to-network-setup-migration-service#postgresql-source-private-ip-to-flexible-server-private-endpoint nor from https://learn.microsoft.com/en-us/azure/postgresql/migrate/migration-service/concepts-migration-service-runtime-server?tabs=azure-portal what the solution is. Can I make the migration runtime server work with Private Links towards source and Target? If not is there any other way?
  4. Does it matter if the data is encrypted with a CMK? Most likely I need to create a new CMK at source side for each new target server. Will that have any impact on the migration using the Migration service?
Azure Database Migration service
{count} votes

Answer accepted by question author
  1. VRISHABHANATH PATIL 2,230 Reputation points Microsoft External Staff Moderator
    2025-10-17T10:15:33.18+00:00

    Hi @Pim Beliën,

    Thanks for reviewing the earlier given solution and below are the detailed steps which answers your additional question -

    Your idea of using Azure Private Link Service with a Load Balancer is creative and technically possible, but there are some important considerations:

    How It Works

    • You expose the PostgreSQL server in Tenant B behind an Internal Load Balancer.
    • Create a Private Link Service on that Load Balancer.
    • In Tenant A, create a Private Endpoint that connects to the Private Link Service.
    • This allows Tenant A’s VNET to reach the Load Balancer in Tenant B over a private connection without VNET peering.

    Key Constraints

    1. PostgreSQL Protocol Support
      • The Load Balancer must forward TCP traffic correctly to PostgreSQL (port 5432).
        • No Layer 7 inspection—this is pure TCP forwarding.
        1. DNS Resolution
          • You’ll need to configure Private DNS Zones so that the PostgreSQL hostname resolves to the Private Endpoint IP in Tenant A.
          1. Authentication
            • Ensure PostgreSQL accepts connections from the Load Balancer’s IP (or configure firewall rules accordingly).
            1. Operational Complexity
              • This adds an extra hop (Load Balancer → PostgreSQL), which could slightly impact latency.
                • You’ll need to manage health probes and ensure the LB doesn’t interfere with PostgreSQL traffic.

    Microsoft Guidance

    This approach is supported because Private Link Service is designed for cross-tenant connectivity scenarios. It’s often used for exposing services privately across tenants without peering.

    Reference:

    Hope the above steps were helpful. If you have any other questions, please feel free to contact us.

    Thanks,
    Vrishabh


0 additional answers

Sort by: Most 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.