La promoción significa que la instancia de AlloyDB para PostgreSQL de destino se desconecta de la fuente y pasa de ser una instancia de réplica a una instancia principal.
En el caso de las migraciones continuas, puedes iniciar el proceso de promoción cuando sea el momento de transferir las lecturas y escrituras al destino.
Para promocionar una migración sin perder información, sigue estos pasos:
Haga clic en la tarea de migración que represente la migración que quiera promover. Se mostrará la página Detalles de la tarea de migración.
Una vez que se haya completado la fase de volcado completo y la tarea de migración esté en la fase de CDC, estará disponible la opción de promoción.
Inmediatamente después de pasar a la fase de CDC, en función del tamaño del volcado, puede haber un retraso de replicación prolongado porque la instancia de destino de AlloyDB para PostgreSQL se pone al día con los cambios que se han producido durante el volcado y la carga.
Espera a que el retraso de la replicación se reduzca significativamente, idealmente en el orden de minutos o segundos. El retraso de replicación se puede consultar en la página de la tarea de migración.
Cuando la latencia de replicación sea mínima, podrás iniciar la promoción.
Para evitar que se pierdan datos, haz lo siguiente:
Detén todas las operaciones de escritura, las secuencias de comandos en ejecución y las conexiones de cliente a la base de datos de origen. Aquí empieza el periodo de inactividad.
Espera hasta que la latencia de replicación sea cero, lo que significa que el trabajo de migración ha procesado todos los cambios pendientes.
En la página Detalles de la tarea de migración, haz clic en Promover.
En la ventana ¿Promocionar tarea de migración?, haz clic en Promocionar.
La tarea de migración deja de leer datos de la fuente y el subestado es
Promote in progress. En este punto, no puedes detener ni deshacer el proceso de promoción.
La instancia de destino se convierte en una instancia principal de escritura.
El estado de la tarea de migración es Completed.
Ahora, la aplicación se puede conectar a la instancia de AlloyDB para PostgreSQL y el trabajo de migración se puede eliminar de forma segura.
Si asciendes tareas de migración que han fallado o se han detenido manualmente durante la fase de CDC, los datos de origen y destino pueden no ser coherentes.
[[["Es fácil de entender","easyToUnderstand","thumb-up"],["Me ofreció una solución al problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Es difícil de entender","hardToUnderstand","thumb-down"],["La información o el código de muestra no son correctos","incorrectInformationOrSampleCode","thumb-down"],["Me faltan las muestras o la información que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-08-21 (UTC)."],[[["\u003cp\u003ePromotion of an AlloyDB for PostgreSQL migration job converts the destination instance from a replica to a primary instance, disconnecting it from the source.\u003c/p\u003e\n"],["\u003cp\u003eThe promotion option becomes available after the full dump phase is completed and the migration is in the CDC phase, but it is ideal to wait until the replication delay is minimal.\u003c/p\u003e\n"],["\u003cp\u003eBefore promoting, all writes, scripts, and client connections to the source database must be stopped to prevent data loss.\u003c/p\u003e\n"],["\u003cp\u003eAfter the promotion process is initiated, it cannot be stopped or undone, and the destination instance becomes the primary writable instance.\u003c/p\u003e\n"],["\u003cp\u003ePromoting a failed or manually stopped migration during the CDC phase can result in data inconsistencies between the source and destination databases.\u003c/p\u003e\n"]]],[],null,["# Promote a migration\n\n\u003cbr /\u003e\n\n[MySQL](/database-migration/docs/mysql/promote-migration \"View this page for the MySQL version of Database Migration Service.\") \\| [PostgreSQL](/database-migration/docs/postgres/promote-migration \"View this page for the PostgreSQL version of Database Migration Service.\") \\| PostgreSQL to AlloyDB\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\nPromotion means that the destination AlloyDB for PostgreSQL instance is disconnected from\nthe source, and is promoted from a replica instance to a primary instance.\n\n\nFor continuous migrations, you can initiate the promotion process\nafter it's time to move reads and writes to the destination.\n\nTo promote a migration without loss of information, follow these steps:\n\n1. Go to the [Migration jobs](https://console.cloud.google.com/dbmigration/migrations) page.\n2. Click the migration job that represents the migration that you want to promote. The **Migration job details** page appears.\n\n3. After the full dump phase has completed and the migration job is in CDC phase, the option for promotion is available.\n4.\n Immediately after transitioning to the CDC phase, depending on the size of the dump, there may be a long replication delay because the AlloyDB for PostgreSQL destination instance catches up on changes that occurred during the dump and load.\n\n Wait for the replication delay to trend down significantly, ideally on the\n order of minutes or seconds. The replication delay is available for review on\n the migration job page.\n5. After the replication delay is at a minimum, you can initiate the promotion. To avoid data loss, make sure to:\n 1. **Stop all writes, running scripts, and client connections to the source\n database**. The downtime period begins here.\n 2. Wait until the replication delay is at zero, which means that the migration job has processed all outstanding changes.\n\n | You can promote a migration even if the replication delay isn't at zero. This can reduce the database downtime, but may affect the accuracy of the data in the destination.\n6. In the **Migration job details** page, click **Promote**.\n7. In the **Promote migration job?** window, click **Promote**.\n8. The migration job stops reading from the source and the substatus is `Promote in progress`. At this point, you cannot stop or undo the promotion process.\n9. The destination instance is promoted to a primary writeable instance. The migration job status is `Completed`.\n10. The application can now be connected to the AlloyDB for PostgreSQL instance and the migration job can be safely deleted.\n\nWhen you promote migration jobs that have failed or were manually stopped during CDC phase, data on the source and the\ndestination can be inconsistent."]]