Chapter 01. Installing PostgreSQL the Right Way! (10 pages)
There are multiple ways you can install PostgreSQL on a server. This chapter will talk about the best ways to do so, focusing on system-level parameter settings before installation as a prerequisite and also post-installation steps to avoid issues in the future.
Chapter 02. Configuring your Database for Performance (20 pages)
PostgreSQL ships with a basic configuration tuned for wide compatibility rather than performance. Although the default settings of PostgreSQL are viable, it is always recommended to tune some basic parameters based on your environment and application behavior.
Chapter 03. Enable Logging of your Database (15 pages)
Logging is key when you troubleshoot issues of PostgreSQL for security and performance to find out the trends. Default PostgreSQL configuration comes with very minimal logging and it is not always enough to troubleshoot the issues. So, this chapter will explain how to set logging and consequences of high logging and how to deal with it.
Good monitoring is a symbol of a peaceful life for an administrator. If you set up monitoring of your databases to alert you whenever an issue comes up, then you need not worry about keeping an eye at your databases' health. This chapter will show you ways to monitor PostgreSQL instances.
Chapter 05. Execute Maintenance (15 pages)
Why do you need maintenance? What would you get from it? when do decide "it's time for maintenance"? How do you do it? Is there any way I can improve my maintenance time? This chapter will shed some light on all these questions.
Chapter 06. Securing Databases (15 pages)
Security is one of the major concerns for storing sensitive data. It could be one of the reasons customers change their database engines. So, this chapter will talk about how best you can secure your data in PostgreSQL.
Chapter 07. Backup and Restore Best Practices (15 pages)
For critical data systems, backup and restore is a very important consideration. However, it's very important to know what factors you should consider before you implement a backup strategy and how to implement one. This chapter talks about developing backup procedures for critical/non-critical data systems and quick restore procedures as well.
Chapter 08. High Availability Procedures (15 pages)
You may come across some situations where you cannot make your primary working with-in your affordable time window. What do you do in that scenario? Implementing High Availability is always the best practice for such critical applications. This chapter talks about HA implementation and open source tools that can be used with PostgreSQL to implement the same.
Chapter 09. Implementing Pooler (15 pages)
While running your application with limited resources, then it is highly recommended to use Pooling to connect the database. Performance of a database depends on the parallel connections that it can allow. Huge connections to a database in parallel degrades the database performance. This chapter will teach you to implement a pooler mechanism for your PostgreSQL instances.
Chapter 10. Basic Errors and Handy Queries (15 pages)
Working with PostgreSQL, there are bound to be some errors you might face that takes a lot of time to resolve. And, some times you might need some queries which are based on catalogs to fetch the information. This chapter talks about some of these errors and their resolution so that it can save some time for administrators followed by handy queries to help them perform their daily duties.
Baji Shaik is a database administrator and developer. He was introduced to databases in 2011 and over the years, has worked with Oracle, PostgreSQL, Postgres Advance Server, RedShift, and Greenplum. He has a wide range of expertise and experience in SQL/NoSQL databases such as Cassandra and DynamoDB. He is a database migration expert and has developed many successful database solutions addressing challenging business requirements for moving databases from on-premises to AWS Cloud using multiple AWS services. Baji has organized a number of PostgreSQL meet-ups and maintains his own technical blog, where he likes to share his knowledge with the community. He co-authored Beginning PostgreSQL on the Cloud, released in March 2018.
Obtain all the skills you need to configure and manage a PostgreSQL database. In this book you will begin by installing and configuring PostgreSQL on a server by focusing on system-level parameter settings before installation. You will also look at key post-installation steps to avoid issues in the future. The basic configuration of PostgreSQL is tuned for compatibility rather than performance. Keeping this in mind, you will fine-tune your PostgreSQL parameters based on your environment and application behavior. You will then get tips to improve database monitoring and maintenance followed by database security for handling sensitive data in PostgreSQL.
Every system containing valuable data needs to be backed-up regularly. PostgreSQL follows a simple back-up procedure and provides fundamental approaches to back up your data. You will go through these approaches and choose the right one based on your environment. Running your application with limited resources can be tricky. To achieve this you will implement a pooling mechanism for your PostgreSQL instances to connect to other databases. Finally, you will take a look at some basic errors faced while working with PostgreSQL and learn to resolve them in the quickest manner.