Quantcast
Channel: Severalnines - clustercontrol
Viewing all articles
Browse latest Browse all 385

Deploying and Managing PostgreSQL 11: New in ClusterControl 1.7.1

$
0
0

A few days ago was the release of a new version of ClusterControl, the 1.7.1, where we can see several new features, one of the main ones being the support for PostgreSQL 11.

To install PostgreSQL 11 manually, we must first add the repositories or download the necessary packages for the installation, install them and configure them correctly, depending on our infrastructure. All these steps take time, so let’s see how we could avoid this.

In this blog, we will see how to deploy this new PostgreSQL version with a few clicks using ClusterControl and how to manage it. As pre-requisite, please install the 1.7.1 version of ClusterControl on a dedicated host or VM.

Deploy PostgreSQL 11

To perform a new installation from ClusterControl, simply select the option “Deploy” and follow the instructions that appear. Note that if you already have a PostgreSQL 11 instance running, then you need to select the ‘Import Existing Server/Database’ instead.

ClusterControl Deploy Option
ClusterControl Deploy Option

When selecting PostgreSQL, we must specify User, Key or Password and port to connect by SSH to our PostgreSQL hosts. We also need the name for our new cluster and if we want ClusterControl to install the corresponding software and configurations for us.

ClusterControl Deploy Information 1
ClusterControl Deploy Information 1

Please check the ClusterControl user requirement for this task here.

ClusterControl Deploy Information 2
ClusterControl Deploy Information 2

After setting up the SSH access information, we must define the database user, version and datadir (optional). We can also specify which repository to use. In this case, we want to deploy PostgreSQL 11, so just select it and continue.

In the next step, we need to add our servers to the cluster we are going to create.

ClusterControl Deploy Information 3
ClusterControl Deploy Information 3

When adding our servers, we can enter IP or hostname.

In the last step, we can choose if our replication will be Synchronous or Asynchronous.

ClusterControl Deploy Information 4
ClusterControl Deploy Information 4

We can monitor the status of the creation of our new cluster from the ClusterControl activity monitor.

ClusterControl Activity Section
ClusterControl Activity Section

Once the task is finished, we can see our new PostgreSQL 11 cluster in the main ClusterControl screen.

ClusterControl Main Screen
ClusterControl Main Screen

Once we have our cluster created, we can perform several tasks on it, like adding a load balancer (HAProxy) or a new replica.

ClusterControl Cluster Section
ClusterControl Cluster Section

Scaling PostgreSQL 11

If we go to cluster actions and select “Add Replication Slave”, we can either create a new replica from scratch, or add an existing PostgreSQL database as a replica.

ClusterControl Add Replication Slave Option
ClusterControl Add Replication Slave Option

Let's see how adding a new replication slave can be a really easy task.

ClusterControl Add Replication Slave Information
ClusterControl Add Replication Slave Information

As you can see in the image, we only need to choose our Master server, enter the IP address for our new slave server and the database port. Then, we can choose if we want ClusterControl to install the software for us, and if the replication slave should be Synchronous or Asynchronous.

In this way, we can add as many replicas as we want and spread read traffic between them using a load balancer, which we can also implement with ClusterControl.

We can see more information about the HA for PostgreSQL in a related blog.

From ClusterControl, you can also perform different management tasks like Reboot Host, Rebuild Replication Slave or Promote Slave, with one click.

ClusterControl Node Actions
ClusterControl Node Actions

Backups

In previous blogs we took a look on the backup and PITR ClusterControl features for PostgreSQL. Now, in the last ClusterControl version, we have the "verify/restore backup on a standalone host" and "create a cluster from an existing backup" features.

In ClusterControl, select your cluster and go to the "Backup" section to see your current backups.

ClusterControl Backups Section
ClusterControl Backups Section

In the "Restore" option, first, you can choose which backup will be restored.

ClusterControl Restore Backup Option
ClusterControl Restore Backup Option

There, we have three options.

ClusterControl Restore on node Option
ClusterControl Restore on node Option

The first one is the classic "Restore on node" option. This just restores the selected backup on a specific node.

ClusterControl Restore and verify on standalone host Option
ClusterControl Restore and verify on standalone host Option

The "Restore and verify on standalone host" option is a new ClusterControl PostgreSQL feature. This allows us to test the generated backup by restoring it on a standalone host. This is really useful to avoid any surprises in a disaster recovery scenario.

To use this feature, we need a dedicated host (or VM) that is not part of the cluster.

ClusterControl Restore and verify on standalone host Information
ClusterControl Restore and verify on standalone host Information

Add the dedicated host IP address and choose the desire options.

ClusterControl Verified Backup
ClusterControl Verified Backup

When the backup is verified, you can see the "Verified" icon in the backup list.

ClusterControl Create Cluster From Backup Option
ClusterControl Create Cluster From Backup Option

"Create Cluster From Backup" is another important new ClusterControl PostgreSQL feature.

As the name suggests it , this feature allow us to create a new PostgreSQL cluster with the data from the generated backup.

After choosing this option, we need to follow the same steps that we saw in the deploy section.

ClusterControl Create Cluster From Backup Information
ClusterControl Create Cluster From Backup Information

All the configuration like user, number of nodes or replication type can be different in this new cluster.
When the new cluster is created, you can see both, the old and the new one in the ClusterControl main screen.

ClusterControl Main Screen
ClusterControl Main Screen

Conclusion

As we have seen above, you can now deploy the latest PostgreSQL release, version 11 using ClusterControl. Once deployed, ClusterControl provides a whole range of features, from monitoring, alerting, automatic failover, backup, point-in-time recovery, backup verification, to scaling of read replicas. This can help you manage Postgres in a friendly and intuitive way. Give it a try!


Viewing all articles
Browse latest Browse all 385

Trending Articles