O'Reilly logo

PostgreSQL High Performance Cookbook by Dinesh Kumar, Chitij Chauhan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using walctl to create replica

In this recipe, we are going to use the walctl_clone utility to create a clone/replica

How to do it...

For this recipe only two servers are needed. One is the primary server and the other is the replica server. Our primary server will be named pg-primary and the replica will be named pg-clone server.

We need to execute the following command on the replica server:

walctl_clone pg-primary walctl

How it works...

walctl_clone has two parameters. The first parameter is supposed to be the hostname of the primary server and the second parameter should be the name of the database superuser with which we are going to create a backup.

Here are the series of actions that are performed on behalf of walctl_clone:

  • It puts the primary ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required