Quick-start migrations for homogeneous PostgreSQL

This page describes quick-start migrations for homogeneous PostgreSQL migrations to Cloud SQL for PostgreSQL and AlloyDB for PostgreSQL. Quick-start migrations are a lightweight continuous migration flow for homogeneous PostgreSQL scenarios that streamline the migration process with features like automated networking, embedded discovery, fast replication (based on pgnative), and more. This page describes quick-start migrations for homogeneous PostgreSQL migrations to Cloud SQL for PostgreSQL and AlloyDB for PostgreSQL:

  • Overview provides the high-level description of what quick-start migrations are and how you can use them to enhance your migration experience.
  • Guides and supported scenarios contains links to step-by-step instructions for all quick-start migration flows.
  • Network connectivity explains the unique architecture employed by Database Migration Service in quick-start migrations.
  • Limitations describe known limitations and caveats to keep in mind when you follow quick-start migrations.

Overview

With quick-start migrations, Database Migration Service can automatically set up everything you need to migrate sources accessible through private IP addresses in a VPC network, over VPC peering, or over public IP addresses. Destinations can be configured with either Private Service Connect or Private Services Access (PSA). Key highlights of quick-start migrations include:

  • pgnative replication: The native replication mechanism lets you migrate without installing extra PostgreSQL extensions or demoting the destination instance. Other databases on your destination instance remain operational, without any interruptions to your traffic.
  • Simplified networking: Database Migration Service automatically handles network connectivity over private IPs. In quick-start migrations, all the required resources (private connectivity configuration, the network attachment and its subnet) are automatically created to enable connections over Private Service Connect interfaces. For more information, see the Network connectivity section.
  • Embedded discovery: You can start, manage, and monitor migrations directly in your destination Cloud SQL or AlloyDB for PostgreSQL instances with the Database Migration Service observability features.

The following table summarizes key differences between quick-start and standard homogeneous PostgreSQL migrations:

Feature Standard migrations (pglogical) Quick-start migrations (native replication)
Extension installation Required. You must install and configure the pglogical extension on your source database. Not required.
Destination instance state Must be empty and demoted (for Cloud SQL) or in bootstrapping mode (for AlloyDB for PostgreSQL). Can be a live instance with active traffic to other databases (not being migrated).
Network connectivity Supports Private Service Connect interfaces, Virtual Private Cloud peering, reverse SSH tunnels, and public IP connectivity. The destination database connects directly to the source database, creating a dependency between source and destination network configurations. Uses a mediated architecture where Database Migration Service connects to the source and destination independently.

For source connectivity method, Database Migration Service supports Private Service Connect interfaces, Virtual Private Cloud peering, and public IP connectivity (with dedicated private connectivity configuration for public IP).

For destination connectivity, Database Migration Service leverages dedicated internal networking. This means that your destination instance must have a private IP enabled, but can also allow public IP connections. For example, your destination can be configured to use any combination of Private Service Connect, Private Services Access (PSA), and incoming Public IP connections. Destinations configured without any private IP aren't supported.

Tables without primary keys Not supported. All tables must have primary keys. Supported. You can replicate tables without primary keys by setting the replica identity to INDEX or FULL.
Parallel migration jobs Not supported. You can run only one migration job per source database instance. Supported. You can run multiple migration jobs in parallel from the same source instance, with each job migrating different databases (up to 50 databases per job).
Destination object ownership Objects are owned by the postgres user. Objects are owned by the migration user generated by Database Migration Service (if using the Google Cloud console) or the user you supply (if using Google Cloud CLI).

Guides and supported scenarios

A video preview of the quick-start migration flow.

Quick-start migrations for homogeneous PostgreSQL facilitate continuous homogeneous migrations to new or existing Cloud SQL for PostgreSQL or AlloyDB for PostgreSQL destinations. This migration flow supports migrating over public or private IP connections:

  • For sources accessible over public IP addresses by using a dedicated private connectivity configuration for public IP. Sources hosted outside Google Cloud can connect directly using public IP, or through private IP using network components such as a Cloud VPN connection or Cloud Interconnect.

  • For sources accessible over private IP addresses in your Google Cloud Virtual Private Cloud (VPC) network (using Private Service Connect interfaces), such as self-managed databases on Compute Engine or Cloud SQL for PostgreSQL instances.

You can begin your quick-start migration journey in multiple places in the Google Cloud console:

Network connectivity

At a high-level, quick-start migrations use a mediated networking architecture. Database Migration Service and destination Cloud SQL for PostgreSQL or AlloyDB for PostgreSQL instances reside in their own networks outside the VPC networks that you use in your Google Cloud project. Database Migration Service acts as an intermediary, establishing independent connections to your source database and to your destination database.

Figure 1. Simplified view of networking for quick-start migrations (click to enlarge)

Database Migration Service fully facilitates both source and destination connectivity for quick-start migrations.

For source database connectivity, Database Migration Service can connect to your source database over private IP with Private Service Connect interfaces or from a dedicated public IP. You configure source connectivity with the private connectivity configuration resource in Database Migration Service.

For destination database connectivity, Database Migration Service fully manages network communication to your destination instance over private networks. This means that your destination instance must have a private IP configured, but depending on the scenario, different combinations of connectivity settings are supported:

  • Cloud SQL for PostgreSQL destinations: For quick-start migrations, the Cloud SQL for PostgreSQL destinations are required to have a private IP configured, but they are also allowed to be enabled for public IP connectivity. These destination instances can be configured to use any combination of Private Service Connect, Private Services Access (PSA), and incoming Public IP connections. Destinations configured without any private IP aren't supported.

  • AlloyDB for PostgreSQL destinations: For quick-start migrations, the AlloyDB for PostgreSQL destinations must be instances enabled for Private Service Connect connectivity. PSA or public IP connectivity can be enabled on the destination after you complete the quick-start migration.

Source connectivity with Private Service Connect interfaces

Source connectivity to databases outside Google Cloud

When you migrate from a database hosted outside Google Cloud, you need additional network components to ensure that your database has a private IP address assigned in your Google Cloud VPC network (for example a VPC network). Database Migration Service creates the network attachment in the VPC network where your instance has a private IP assigned.

This diagram shows network connectivity facilitated by Database Migration Service
        for quick-start migrations from databases hosted on-premise or
        as managed offerings outside Google Cloud.
Figure 2. Network connectivity facilitated by Database Migration Service for quick-start migrations from databases hosted on-premise or as managed offerings outside Google Cloud. (click to enlarge)
This diagram shows network connectivity facilitated by Database Migration Service
        for quick-start migrations from databases hosted on-premise or
        as managed offerings outside Google Cloud.

Source connectivity to self-hosted databases on Compute Engine

When you migrate from a self-hosted databases on Compute Engine, Database Migration Service creates the network attachment in the same VPC network where you have your VM.

This diagram shows network connectivity facilitated by Database Migration Service
        for quick-start migrations from self-hosted databases on Compute Engine.
Figure 3. Network connectivity facilitated by Database Migration Service for quick-start migrations from self-hosted databases on Compute Engine. (click to enlarge)
This diagram shows network connectivity facilitated by Database Migration Service
        for quick-start migrations from self-hosted databases on Compute Engine.

Source connectivity to Cloud SQL for PostgreSQL

When you migrate from a Cloud SQL for PostgreSQL instance, Database Migration Service creates the network attachment in the VPC network where your instance has a private IP assigned. This IP can be a result of a Private Services Access (PSA) or Private Service Connect configuration. For more information, see Private IP configuration in the Cloud SQL documentation.

This diagram shows network connectivity facilitated by Database Migration Service
        for quick-start migrations from a Cloud SQL for PostgreSQL instance.
Figure 4. Network connectivity facilitated by Database Migration Service for quick-start migrations from a Cloud SQL for PostgreSQL instance. (click to enlarge)
This diagram shows network connectivity facilitated by Database Migration Service
        for quick-start migrations from a Cloud SQL for PostgreSQL instance.

Source connectivity using public IP

When you migrate from a source database that uses a public IP address, quick-start migrations rely on a specialized private connectivity configuration for public IP. When configured, Database Migration Service allocates a newly created, dedicated static public IP address available exclusively for that private connectivity configuration. If your source database is protected by a firewall or an incoming IP allowlist, you must add this dedicated public IP address to your source database firewall rules or incoming IP allowlist so that Database Migration Service can establish a connection.

This diagram shows network connectivity facilitated by Database Migration Service
        for quick-start migrations from a database using public IP.
Figure 5. Network connectivity facilitated by Database Migration Service for quick-start migrations using public IP. (click to enlarge)
This diagram shows network connectivity facilitated by Database Migration Service
        for quick-start migrations from a database using public IP.

Limitations

The following limitations apply to quick-start migrations. If your migration scenario requires the use of any unsupported features, we recommend you follow the standard migration flow instead. For more information, see Migrate to Cloud SQL for PostgreSQL or Migrate to AlloyDB for PostgreSQL documentation pages.

  • Quick-start migrations don't support migrating from PostgreSQL versions 9.6 or lower.

  • Reverse SSH tunnels aren't supported for quick-start migrations. Source connectivity must use Private Service Connect interfaces, VPC peering, or public IP.

  • SSL encryption options for source connections only support none and required variants for quick-start migrations (standard migrations support verify-ca and verify-full).

  • Quick-start migrations can accommodate up to 50 databases per migration job. If your source server contains more than 50 databases, you can set up multiple parallel migration jobs to migrate them.

  • Standard migration fidelity limitations apply, with the following exceptions:

    • You don't have to install the pglogical extension for quick-start migrations.
    • Migrating tables without primary keys is supported.

What's next