Faraway replicas

Create a faraway replica

You can create faraway replicas in any active regions in your cloud. There's no limit on the number of faraway replicas each cluster can have. However, the added resources and data transfers can increase your cloud costs.

  1. Go to the Clusters page. A list of previously created clusters appears.

  2. Select the Create Replica icon next to a cluster to create its faraway replica. The Create Faraway Replica page appears.

  3. You can't edit the Cloud Provider field. The cloud provider is inherited from the source cluster. Move to the Cluster Settings tab.

  4. On the Cluster Settings tab, enter a name for your replica in the Cluster Name field.

  5. Skip to the Region section and select an active region where you want to deploy your replica. You can also choose to deploy your replica in the same region as the source cluster. The password and database type values are inherited from the source cluster.

  6. Select the instance type in the Instance Type section. See Creating a cluster for details on instance type settings.

  7. Select the storage settings in the Storage section. See Creating a cluster for details on the storage settings.

  8. In the Networking section, specify whether to use private or public networking. See Creating a cluster for details on the Networking settings.

  9. On the DB Configuration tab, to avoid replication issues when running a replica (standby server), keep the inherited value or increase it for the following database configuration parameters:

    • max_connections

    • max_locks_per_transaction

    • max_prepared_transactions

    • max_wal_senders

    • max_worker_processes

  10. On the Additional Settings tab,

    Under the Backups section, change the default replica backup retention period of 30 days using the Retention Time controls. You can configure the retention period as follows:

    • 1–180 days
    • 1–25 weeks
    • 1–6 months

    Enable the Custom Maintenance Window option and use the controls to set a weekly 60-minute maintenance window in which maintenance upgrades occur for the cluster. If you don't set a window, the updates are applied at EDB's discretion with prior notification.

    Note

    Typically, maintenance updates take only a few minutes to complete.

    For more information, see Periodic maintenance.

    Under the Extensions section,

    • enable the pgvector extension to add support for vector storage and vector similarity search to Postgres.
    • enable the PostGIS extension to add support for storing, indexing and querying geographic data.

    Under the Security section, the Transparent Data Encryption (TDE) option is enabled by default only when your primary cluster is TDE-enabled. It automatically enables TDE and allows you to select the encryption key from the available List.

    Note

    The TDE key material for faraway replicas must be the same as the primary cluster encryption key. If you use different key material, the cluster provisioning will fail.

    EDB does not support enabling TDE when restoring non-TDE faraway replica clusters.

  11. To turn on the ability to log in to Postgres using your AWS IAM credentials, enable Identity and Access Management (IAM) Authentication. See Access.

  12. Select Create Replica.

Modify a replica

  1. Sign in to the Console.

  2. Go to the Clusters page. A list of previously created clusters appears.

  3. Select the cluster with the replica you want to modify. In the Overview tab, you can see the cluster's replicas under Faraway Replicas.

  4. Select the Edit Cluster icon next to the replica you want to modify. The Edit Faraway Replica page appears.

  5. In the Cluster Settings tab, in the Cluster Name field, enter the name for your replica.

  6. In the Password field, enter a password for your replica.

    In the Database Type section, you can see the Postgres type and Postgres version inherited from the source cluster. You can't edit the Postgres type and Postgres version.

  7. Skip the Region section. The region is inherited from the source cluster and you can't modify it.

  8. Select the instance type in the Instance Type section. See Creating a cluster for details on instance type settings.

    Note

    To avoid lag during replication, ensure that your replica instance type is at least as large as the source cluster's instance type.

  9. Select the storage settings in the Storage section. See Creating a cluster for details on the storage settings.

    Note

    To avoid lag during replication, ensure that your replica storage type is at least as large as the source cluster's storage type.

  10. In the Networking section, you specify whether to use private or public networking. See Creating a cluster for details on the Networking settings.

  11. On the DB Configuration tab, to avoid replication issues when running a replica (standby server), set the following database configuration parameters to the same or higher value than on the source cluster (primary server). Otherwise, queries aren't allowed in the replica. If you plan to increase these GUC values, we highly recommend that you set the same value for all faraway replicas first and then set the value on the source cluster. Conversely, if you plan to decrease these GUC values, we recommend setting the source cluster's value first and then the value for all faraway replicas.

  • max_connections

  • max_locks_per_transaction

  • max_prepared_transactions

  • max_wal_senders

  • max_worker_processes

  1. Select Save.

Promoting a replica

You can promote a faraway replica to a full-fledged cluster, which makes it capable of accepting writes. The new cluster created is different from the source cluster, and it doesn't replace the source cluster.

  1. Go to the Clusters page. A list of previously created clusters appears.

  2. Select the cluster with the replica you want to promote. In the Overview tab, you can see the cluster's replicas under Faraway Replicas.

  3. Select the Promote Faraway Replica icon next to the replica you want to promote. The Promote Faraway Replica page appears.

  4. The cluster settings are populated with values inherited from the source cluster. You can edit the cluster settings while creating your cluster.

    Notes
    • You can promote a faraway replica to a single node or high-availability cluster but not to a distributed high-availability cluster.
    • While promoting a replica to a cluster, you can't modify the Provider and Region fields and the Database Type section or enable read-only workloads.
  5. Select Promote Replica.

Deleting a replica

  1. Sign in to the Console.

  2. Go to the Clusters page. A list of previously created clusters appears.

  3. Select the cluster with the replica you want to delete. In the Overview tab, you can see the cluster's replicas under Faraway Replicas.

  4. Select the replica you want to delete.

  5. Select the Delete icon next to the replica.

  6. Confirm that you want to permanently delete the replica. The replica is deleted.

Restoring a replica

You can restore a replica backup to a standalone cluster. A new standalone cluster is created and initialized with data from the replica backup.

  1. Select the cluster with the replica you want to restore on the Clusters page in the Console.

  2. In the Overview tab, you can see the cluster's replicas under Faraway Replicas. Select the replica.

  3. From Quick Actions, select Restore Replica.

  4. On the Restore Replica page:

    1. Fill in the required fields.
    2. To restore to the last possible recovery point, in the Source section, in the Point in Time Restore field, select Now on the calendar. Or, to restore further back in time, choose a timestamp.
    3. Review your selections and select Restore to begin the restore process.
  5. The new standalone cluster is now available on the Clusters page.

Using the CLI to manage faraway replicas

See Faraway replicas CLI commands for information on CLI commands for managing faraway replicas.


Could this page be better? Report a problem or suggest an addition!