Muokkaa

Jaa


Create and manage read replicas in Azure Cosmos DB for PostgreSQL

APPLIES TO: Azure Cosmos DB for PostgreSQL (powered by the Citus database extension to PostgreSQL)

In this article, you learn how to create and manage read replicas in Azure Cosmos DB for PostgreSQL from the Azure portal. To learn more about read replicas, see the overview.

Prerequisites

A cluster to be the primary.

Create a read replica

To create a read replica, follow these steps:

  1. Select an existing Azure Cosmos DB for PostgreSQL cluster to use as the primary.

  2. On the cluster sidebar, under Cluster management, select Replicate data globally.

  3. On the Replicate data globally screen, select Add replica.

  4. Under Cluster name, enter a name for the read replica.

  5. Select a value from the Location drop-down.

  6. Select OK.

After the read replica is created, you can see it listed on the Replicate data globally screen.

Important

Review the considerations section of the Read Replica overview.

Before a primary cluster setting is updated to a new value, update the replica setting to an equal or greater value. This action helps the replica keep up with any changes made to the master.

Promote a read replica

To promote a cluster read replica to an independent read-write cluster, follow these steps:

  1. Select the read replica you would like to promote in the portal.

  2. On the cluster sidebar, under Cluster management, select Replicate data globally.

  3. On the Replicate data globally page, find the read replica in the list of clusters under the map and click the promote icon.

  4. On the Promote <cluster name> screen, double check the read replica's name, confirm that you understand that promotion is irreversible by setting the checkbox, and select Promote.

After the read replica is promoted, it becomes an independent readable and writable cluster with the same connection string.

Delete a primary cluster

To delete a primary cluster, you use the same steps as to delete a standalone cluster. From the Azure portal, follow these steps:

  1. In the Azure portal, select your primary Azure Cosmos DB for PostgreSQL cluster.

  2. On the Overview page for the cluster, select Delete.

  3. On the Delete <cluster name> screen, select the checkbox next to I understand that this cluster and all nodes that belong to this cluster will be deleted and cannot be recovered.

  4. Select Delete to confirm deletion of the primary cluster.

Delete a replica

You can delete a read replica similarly to how you delete a primary cluster.

You can select the read replica to delete directly from the portal, or from the Replicate data globally screen of the primary cluster.

  1. In the Azure portal, on the Overview page for the read replica, select Delete.

  2. On the Delete <replica name> screen, select the checkbox next to I understand that this replica and all nodes that belong to it will be deleted. Deletion of this replica will not impact the primary cluster or other read replicas.

  3. Select Delete to confirm deletion of the replica.

Next steps