Book Image

Mastering PostgreSQL 11 - Second Edition

By : Hans-Jürgen Schönig
Book Image

Mastering PostgreSQL 11 - Second Edition

By: Hans-Jürgen Schönig

Overview of this book

This second edition of Mastering PostgreSQL 11 helps you build dynamic database solutions for enterprise applications using the latest release of PostgreSQL, which enables database analysts to design both the physical and technical aspects of the system architecture with ease. This book begins with an introduction to the newly released features in PostgreSQL 11 to help you build efficient and fault-tolerant PostgreSQL applications. You’ll examine all of the advanced aspects of PostgreSQL in detail, including logical replication, database clusters, performance tuning, monitoring, and user management. You will also work with the PostgreSQL optimizer, configuring PostgreSQL for high speed, and see how to move from Oracle to PostgreSQL. As you progress through the chapters, you will cover transactions, locking, indexes, and optimizing queries to improve performance. Additionally, you’ll learn to manage network security and explore backups and replications, while understanding the useful extensions of PostgreSQL so that you can optimize the speed and performance of large databases. By the end of this book, you will be able to use your database to its utmost capacity by implementing advanced administrative tasks with ease.
Table of Contents (15 chapters)
Free Chapter
1
PostgreSQL Overview

Q&A

How can you configure network access to PostgreSQL?

There are two levels to configure network access. In postgresql.conf (listen_addresses), you can configure the bind addresses and open remote connections. In pg_hba.conf, you can tell PostgreSQL how to authenticate network connections. Depending on the IP range a request comes from, different rules can be applied.

What is a user and what is a role?

Basically, the difference between a user and a role is academic. When creating a role, the default value is NOLOGIN, which is not the case when you use CREATE USER. Otherwise, roles and users can be considered to be the same.

How can a password be changed?

This is simple. You can use ALTER USER to do the job, as shown in the following example:

test=# ALTER USER hs PASSWORD 'abc';
ALTER ROLE

Keep in mind that passwords are not necessarily stored in PostgreSQL. If...