Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying PostgreSQL 13 Cookbook
  • Table Of Contents Toc
PostgreSQL 13 Cookbook

PostgreSQL 13 Cookbook

By : Vallarapu Naga Avinash Kumar
4 (12)
close
close
PostgreSQL 13 Cookbook

PostgreSQL 13 Cookbook

4 (12)
By: Vallarapu Naga Avinash Kumar

Overview of this book

PostgreSQL has become the most advanced open source database on the market. This book follows a step-by-step approach, guiding you effectively in deploying PostgreSQL in production environments. The book starts with an introduction to PostgreSQL and its architecture. You’ll cover common and not-so-common challenges faced while designing and managing the database. Next, the book focuses on backup and recovery strategies to ensure your database is steady and achieves optimal performance. Throughout the book, you’ll address key challenges such as maintaining reliability, data integrity, a fault-tolerant environment, a robust feature set, extensibility, consistency, and authentication. Moving ahead, you’ll learn how to manage a PostgreSQL cluster and explore replication features for high availability. Later chapters will assist you in building a secure PostgreSQL server, along with covering recipes for encrypting data in motion and data at rest. Finally, you’ll not only discover how to tune your database for optimal performance but also understand ways to monitor and manage maintenance activities, before learning how to perform PostgreSQL upgrades during downtime. By the end of this book, you’ll be well-versed with the essential PostgreSQL 13 features to build enterprise relational databases.
Table of Contents (14 chapters)
close
close
12
About Packt

Initializing a PostgreSQL cluster using initdb

Now that we've installed Postgres, we need to choose a directory where the data directory can be created. This data directory will be used to store the databases and the underlying objects we create. To create a data directory, we must use initdb. In this recipe, we shall see the steps involved in initializing a PostgreSQL cluster using initdb.

Getting ready

The postgresql13-server package must be installed on the database server for us to use initdb. Follow the previous recipe to perform the installation. $PGDATA is the environment variable used by Postgres to identify its data directory. This variable can be optionally set in .bash_profile of the Postgres home directory to avoid passing the data directory location to initdb.

How to do it...

In this recipe, we will be using the default data directory for PostgreSQL 13 on CentOS/RedHat and using initdb to initialize the data directory. Let's get started:

  1. Set the location of...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
PostgreSQL 13 Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon