Edit

Share via


Create virtual endpoints

APPLIES TO: Azure Database for PostgreSQL - Flexible Server

This article provides step-by-step instructions to create virtual endpoints for an Azure Database for PostgreSQL flexible server.

Steps to create virtual endpoints

Using the Azure portal:

  1. Select the Azure Database for PostgreSQL flexible server for which you want to create virtual endpoints.

  2. In the resource menu, under the Settings section, select Replication.

    Screenshot showing the Replication page.

  3. In the Virtual endpoints section, select Create virtual endpoints.

    Screenshot showing the location of the Create virtual endpoints button in the Replication page.

  4. The two fully qualified domain name aliases (CNAME) records that get created when you create virtual endpoints, have the following pattern: <virtual-endpoints-base-name>.writer.postgres.database.azure.com and <virtual-endpoints-base-name>.reader.postgres.database.azure.com. In the Create virtual endpoints dialog, in the Virtual endpoints base name, enter a meaningful name which isn't taken already by some other server.

    Screenshot showing where to enter the virtual endpoints base name.

  5. Target of writer virtual endpoint must always point to the primary server, because that's the only server that is configured to support user initiated write operations. If the server on which you're creating the virtual endpoints don't have any read replica, then Target of reader virtual endpoint also points to the primary server. However, if the server on which you're creating the virtual endpoints has some read replica, by default Target of reader virtual endpoint is pointed to one of the read replicas, and can be changed to point to the primary server or to any other read replica, provided there's more than one.

    Screenshot showing how the Target of reader virtual endpoint refers to a read replica when there's one configured.

  6. Select Create.

    Screenshot showing the Create button to create the virtual endpoints.

  7. A notification informs you that the virtual endpoints are being created.

    Screenshot showing a notification informing that the virtual endpoints are being created.

  8. When the process completes, a notification informs you that the virtual endpoints were successfully created.

    Screenshot showing a notification informing that the virtual endpoints were created successfully.