Adding a Database or Cluster Node

Adding a Database or Cluster Node

You can use options on the Actions drop-down menu (located in the upper-right corner of the Cloud console) to add a database to a node or a node to a cluster. The menu options are context-sensitive, applying to the object currently selected in the navigation panel. To access menu options, select the name of the cluster or database you'd like to modify in the navigation panel, and then open the Actions menu.

Adding a Node to a Cluster

To add a node to an existing cluster, select the cluster name in the navigation panel, open the Actions menu, and select Add Nodes.

Cluster Overview

When the Add Node dialog opens as shown below, provide details the new node(s):

  • Use indicators on the map or select regions from the drop-down list in the Select regions field to choose the region(s) in which the new nodes will reside.
  • Accept the Default configuration to use server-assigned network addresses or select Manual to assign specific addresses for your new node(s).
  • Modify the deployment details for the new node if needed. The values shown on the instance details reflect the values used for the other nodes in the cluster.

Select the Add Nodes button to deploy your new nodes and add them to your cluster. The cluster will be placed in modification status until the addition is complete; when the update finished, you will be able to access the new node using the SSH configuration defined during the initial cluster creation.

Note: Existing databases are not added to a new node automatically; for details about adding a database to a node, see Adding a Database to a Node.

Adding a Database to a Cluster Node

To add a database to a cluster node, select the database name in the navigation panel, open the Actions menu, and select Add to Nodes. Note that new cluster node must be added to the cluster before you can add a database to the node. The node to which you are adding the database must be a member of the cluster on which the database was created.

When you add a database to a new node, the database is empty. You will need to restore existing schemas and data to the database, and if AutoDDL is not enabled, start replication on the node. Once replication has been re-established, new transactions can be written to the database. To review recommended workflows to bring the node up to date with a full dataset visit here.

Cluster Overview

The Add Database... to Cluster Nodes dialog opens.

Cluster Overview

On the map, nodes labeled with a node name (like n1, n2, or n3) and connected by a dotted line are currently replicating the selected database between themselves. Nodes that are not attached to other nodes by a dotted line, or are unlabeled are not part of the cluster for the selected database. To select a node(s) for updating, click in the Select regions field to access a list of available nodes on which the database does not currently reside, or click a node(s) on the map.

After selecting the node(s), click the Add Nodes button to start the modification process.

When you add a database to a new cluster node, the process places the new node into the Nearest Node DNS. If your application uses this connection, you should plan downtime accordingly until data can be aligned and restored on all nodes, or you should set your application to only read data from a pre-existing node during the data restoration process.

Restoring Data to a Database on a New Cluster Node

Adding a database to a new cluster node does not manage the transfer of existing data to the database. The new node is added to the replication configuration for the database, but you must restore existing data to the new database node through a separate workflow.

We recommended that you stop write transactions to the database while you are restoring data to align the nodes across the cluster. If write transactions are enabled, it is possible for data to not reach other nodes depending on the restoration strategy. This must currently be enforced by your application.

The steps you use to restore data to your new database/node combination will depend on if your nodes are running with AutoDDL enabled.

  • If your nodes are running with AutoDDL enabled, you can use the pgEdge Cloud Restore Database (opens in a new tab) option to restore a data backup from another node. You can perform a restore specifically to just the new node, or restore to all nodes to ensure a complete/refreshed alignment of datasets. Your chosen strategy should take into account your spock subscription and data residency requirements.

If you are using the graphical Restore Database interface to restore your database, the existing nodes will restart during the setup process for the new node in order to re-establish replication. This will cause a brief downtime on these nodes.

Note: If you are using pgBackRest to restore data from another node in your Backup Stores, pgBackRest will re-establish spock repsets using the restored data, automatically re-establishing replication as it was at the time of the backup.