Skip to Content
PostgreSQL: Up and Running, 3rd Edition
book

PostgreSQL: Up and Running, 3rd Edition

by Regina O. Obe, Leo S. Hsu
October 2017
Intermediate to advanced content levelIntermediate to advanced
314 pages
8h 13m
English
O'Reilly Media, Inc.
Book available
Content preview from PostgreSQL: Up and Running, 3rd Edition

Chapter 2. Database Administration

This chapter covers what we consider basic administration of a PostgreSQL server: managing roles and permissions, creating databases, installing extensions, and backing up and restoring data. Before continuing, you should have already installed PostgreSQL and have administration tools at your disposal.

Configuration Files

Three main configuration files control operations of a PostgreSQL server:

postgresql.conf

Controls general settings, such as memory allocation, default storage location for new databases, the IP addresses that PostgreSQL listens on, location of logs, and plenty more.

pg_hba.conf

Controls access to the server, dictating which users can log in to which databases, which IP addresses can connect, and which authentication scheme to accept.

pg_ident.conf

If present, this file maps an authenticated OS login to a PostgreSQL user. People sometimes map the OS root account to the PostgresSQL superuser account, postgres.

Note

PostgreSQL officially refers to users as roles. Not all roles need to have login privileges. For example, group roles often do not. We use the term user to refer to a role with login privileges.

If you accepted default installation options, you will find these configuration files in the main PostgreSQL data folder. You can edit them using any text editor or the Admin Pack in pgAdmin. Instructions for editing with pgAdmin are in “Editing postgresql.conf and pg_hba.conf from pgAdmin3”. If you are unable to find the physical location ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn PostgreSQL - Second Edition

Learn PostgreSQL - Second Edition

Luca Ferrari, Enrico Pirozzi
PostgreSQL 16 Administration Cookbook

PostgreSQL 16 Administration Cookbook

Gianni Ciolli, Boriss Mejías, Jimmy Angelakos, Vibhor Kumar, Simon Riggs

Publisher Resources

ISBN: 9781491963401Errata PageSupplemental Content