Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
PostgreSQL High Performance Cookbook

You're reading from   PostgreSQL High Performance Cookbook Mastering query optimization, database monitoring, and performance-tuning for PostgreSQL

Arrow left icon
Product type Paperback
Published in Mar 2017
Publisher Packt
ISBN-13 9781785284335
Length 360 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Chitij Chauhan Chitij Chauhan
Author Profile Icon Chitij Chauhan
Chitij Chauhan
Dinesh Kumar Dinesh Kumar
Author Profile Icon Dinesh Kumar
Dinesh Kumar
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Database Benchmarking FREE CHAPTER 2. Server Configuration and Control 3. Device Optimization 4. Monitoring Server Performance 5. Connection Pooling and Database Partitioning 6. High Availability and Replication 7. Working with Third-Party Replication Management Utilities 8. Database Monitoring and Performance 9. Vacuum Internals 10. Data Migration from Other Databases to PostgreSQL and Upgrading the PostgreSQL Cluster 11. Query Optimization 12. Database Indexing

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 server in the backup mode.

  • It retrieves all files from the database. It will copy only the changed files if all the data files are residing in the data directory.

  • Once it has copied the respective files it will end the backup mode on the primary server...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image