PostgreSQL Administration

Course Code: PSQLADM

Duration: 5 days

 
 
 
 

PostgreSQL Administration Course Overview

This PostgreSQL Administration course covers administration, maintenance, security and performance tuning of PostgreSQL version 10, 11, 12, 13, 14, 15 and 16 databases.

Exercises and examples are used throughout the course to give practical hands-on experience with the techniques covered.

Course Objectives

This course aims to provide the delegate with the knowledge to be able to install, administer, maintain, backup, recover and tune a PostgreSQL database.

Who will the Course Benefit?

This PostgreSQL Administration course is designed for professional database administrators who need to gain an understanding of the features and functionality that can be used to manage PostgreSQL 10, 11, 12, 13, 14, 15 and 16 databases. This course is also suitable for users of PostgreSQL 9 databases.

Skills Gained

The delegate will learn and acquire skills as follows:

  • Install PostgreSQL
  • Create a database
  • Manage roles and privileges
  • Manage schemas
  • Transaction handling and concurrency
  • Examine statistics and system tables
  • Manage tablespaces
  • Understand error reporting and logging
  • Carry out periodic maintenance with VACUUM autovacuum
  • Backup and recover databases
  • Create indexes to improve table access
  • Optimize queries and indexes
  • Configure settings for increased performance
  • Populate a new database efficiently

PostgreSQL Administration Training Course

Course Introduction

  • Administration and Course Materials
  • Course Structure and Agenda
  • Delegate and Trainer Introductions

Session 1: INSTALLATION AND CONFIGURATION OF POSTGRESQL

  • PostgreSQL Version Numbers
  • PostgreSQL Configuration Recommendations
  • Single Cluster and Database per Server
  • File System Layouts
  • Install PostgreSQL
  • Install PostgreSQL on Linux/UNIX
  • Post-Installation Setup
  • Create a Database Cluster
  • Basic Server Configuration
  • Account Management

Session 2: POSTGRESQL ARCHITECTURE

  • Overview of PostgreSQL Architecture
  • The PostgreSQL Instance
  • How Data is Processed by PostgreSQL
  • PostgreSQL Processes
  • Shared Memory
  • PostgreSQL Directory Structure
  • Manage a PostgreSQL Instance
  • The PostgreSQL Configuration Files
  • Multiversion Concurrency Control
  • The Vacuum utility
  • PostgreSQL WAL

Session 3: POSTGRESQL CLIENT APPLICATIONS

  • Overview of PostgreSQL Client Applications
  • The PostgreSQL Interactive Client Terminal - psql
  • The pgAdmin Tool
  • Client and host based access control
  • Client Connection Problems
  • Authentication Failures
  • Server Startup Failures

Session 4: CREATE AND CONFIGURE A DATABASE

  • Create a New Database using the CREATE DATABASE Command
  • Create a New Database using pgAdmin
  • Start and Stop the Database Server
  • Drop a Database
  • Copy a Database
  • List Databases
  • Obtain Database Object Sizes
  • Initialise a Cluster

PostgreSQL Administration Training Course

Session 5: POSTGRESQL SCHEMAS

  • Overview of the Key Concepts of PostgreSQL Schemas
  • Create and Drop a Schema
  • The Public Schema
  • The Schema Search Path
  • Schemas and Privileges
  • The System Catalog Schema
  • Overview of the Information Schema

Session 6: ROLE MANAGEMENT

  • Overview of PostgreSQL Roles and Privileges
  • Create a User Defined Role
  • Role Attributes
  • Role Membership
  • Assigning Users to Roles
  • Group and User Role Inheritance
  • Removing Roles
  • Troubleshooting and Understanding Role Access

Session 7: FINE GRAINED ACCESS CONTROL USING GRANT

  • Control Database Level Permissions
  • Control Schema Level Permissions
  • Grant Table Level Permissions
  • Define Access Privileges with the GRANT Command
  • Remove Access Privileges with the REVOKE Command
  • Manage Column Rights

Session 8: INDEX CREATION AND MANAGEMENT

  • Index Overview
  • The CREATE INDEX Command
  • Index Types
  • Efficient Usage of PostgreSQL Indexes
  • Index creation
  • B-tree, Hash and BRIN Indexes
  • Single Column Indexes
  • Unique indexes
  • Multicolumn Indexes
  • The INCLUDE clause
  • Partial Indexes
  • Index Based Expressions
  • Creating an index concurrently
  • The REINDEX command
  • List Indexes
  • Manage and Maintain Indexes
  • When Indexes Should be Avoided

Session 9: TRANSACTIONS AND CONCURRENCY

  • Overview of Transaction Processing in PostgreSQL
  • Transaction Properties
  • Transaction Control
  • Multi-version Concurrency Control
  • Concurrency Problems
  • Isolation Levels
  • Implicit Locking
  • Explicit Locking
  • Possible Causes of Lock Contention
  • Deadlocks
  • Advisory Locks
  • Lock Management Parameters

PostgreSQL Administration Training Course

Session 10: POSTGRESQL DATABASES STRUCTURE

  • The PostgreSQL Configuration Files
  • Relocate the Configuration Files
  • Physical Storage and File Layout
  • Overview of Tablespace Usage
  • Table and Row Storage
  • Column Limitations
  • Free Space Map
  • The Visibility Map
  • Index Storage

Session 11: MANAGE TABLESPACES

  • Overview of PostgreSQL Tablespaces
  • Default PostgreSQL Tablespaces
  • Create a Tablespace using SQL Commands and pgAdmin
  • Create a Tablespace in the UNIX Operating System
  • Alter a Tablespace
  • Drop a Tablespace

Session 12: POSTGRESQL LOGGING

  • PostgreSQL Event Log Destinations
  • Configuring syslog, eventlog, stderr and csv format output
  • Configuring What Should be Logged and When

Session 13: POSTGRESQL EXTENSIONS

  • Install the PostgreSQL Contrib Module
  • List the Available Extensions
  • Add an Extension to the postgresql.conf File
  • Create an Extension in a Database
  • Drop an Extension in a Database

PostgreSQL Administration Training Course

Session 14: BACKUP AND RECOVERY OF DATABASES

  • Overview of Backup Methods
  • Export and Import Operations with COPY
  • Backup a Database with Operating System Commands
  • Backup a Database with pg_dump
  • Backup All Databases with pg_dumpall
  • Backup User Credentials
  • Backup Database Object Definitions
  • Overview of Database Restore
  • Restore using psql
  • Restore using pg_restore
  • File system Backup and Recovery

Session 15: POINT-IN-TIME RECOVERY (PITR)

  • Write-ahead Logging and Crash Recovery
  • Checkpoints
  • List the Transaction Logs
  • Transaction Log Optimisation
  • Overview of PITR
  • Setup PITR
  • Continuous Archiving
  • Test Transaction Log Archiving
  • Create a Base Backup using the Low Level API
  • Create a Base Backup using pgBaseBackup
  • The PITR Recovery Process
  • How To Perform a PITR Recovery
  • Recovery Configuration Parameters
  • Timelines
  • Locating the Correct Timestamp
  • Restore Points
  • Clean up the Archived Transaction Logs

PostgreSQL Administration Training Course

Session 16: THE POSTGRESQL QUERY OPTIMIZER

  • Query Optimization
  • Optimization Operations
  • Optimization Decisions
  • Scan Methods
  • Join Methods
  • Join Order
  • Statement Transformation
  • Prepared Statements
  • Query Performance Analysis
  • Detect Slow Queries
  • Use EXPLAIN to optimize Queries and Indexes
  • Execution Plans
  • Query Planner Statistics
  • The ANALYZE command
  • The CREATE STATISTICS command
  • Parameters Affecting Optimization
  • Memory Settings That Affect Performance

Session 17: ROUTINE DATABASE MAINTENANCE

  • Optimize Storage and Manage Clean up with VACUUM
  • Configure VACUUM
  • Configure Autovacuum
  • Cost Based Vacuum Delay
  • Track a VACUUM Process
  • Routine Maintenance Tasks

Session 18: SERVER PERFORMANCE MONITORING AND TUNING

  • Monitor Database Activities
  • System Monitoring & PostgreSQL Monitoring
  • Performance Statistics in the Server Log
  • Statistics Collection Configuration
  • Monitor Database Activity
  • Monitor Table, Index and SQL Statement Activity
  • Monitor Background Writer, WAL and Archiving Activity
  • Progress Reporting
  • Locks

Session 19: POPULATE A DATABASE EFFICIENTLY

  • DISABLE autocommit
  • Configure Variables for Increased Performance
  • Use the COPY Command to Bulk Load Data
  • Drop Indexes and Foreign Keys Temporarily
  • Use the COPY command to Bulk Load Data
  • Temporarily drop indexes and Foreign Key Constraints before a Bulk Load
  • Configure Variables for Increased Performance
  • Temporarily Disable WAL Archival and Streaming Replication
  • Use pg_dump Efficiently
Notes:
  • Course technical content is subject to change without notice.
  • Course content is structured as sessions, this does not strictly map to course timings. Concepts, content and practicals often span sessions.

Requirements

This course assumes a good working knowledge of SQL and specifically of the SELECT, INSERT, UPDATE and CREATE TABLE statements. This knowledge can be obtained by attendance on the pre-requisite SQL for PostgreSQL course.

This course is run on a Linux operating system, therefore a good working knowledge of UNIX/Linux is required. This knowledge can be gained by attendance on the pre-requisite Linux Introduction course

Pre-Requisite Courses

Course Reviews

I recently had the pleasure of attending a custom course designed specifically for our company, delivered by Tarn Stroud. His expertise and dedication were evident throughout the entire session. He explained all concepts with clarity and precision, ensuring that the material was relevant to our specific job roles. The level of detail provided was just right—thorough enough to enhance our understanding without overwhelming us. He kept engaging with all the participants and answered all the questions. Overall, Tarn delivered an exceptional training experience.

Camillo - IT - October 2024

Tarn is excellent instructor and could answer all questions. Course notes were very clear and labs were very useful.

Philip - DBA - Postal/Distribution - October 2024

Great course. Detailed where needed. Great exercises.

Harry - Database specialist - Government - June 2024

Tarn is an excellent instructor who explained the topics very well. He is very experienced and very knowledgeable. He paced the topics well, after introducing concepts, he showed practical demos using the product, and also assisted during the lab exercises. I would definitely recommend him to my colleagues. I look forward to coming on the Advanced Postgres Administration course. Many Thanks

Arif - DBA - IT - March 2024

Superb trainer with an extraordinary amount of knowledge. Friendly personality, great attitude and keen to help. Spent a long and tiring but extremely useful week together.

Dani - Database administrator - IT

Tarn was a really great instructor indeed - thank you. He was very knowledgeable with the PostgreSQL Product and explained everything really clearly to all of us.

Gareth - SQL DBA - IT

Public Scheduled Events

Classroom & Live Virtual Instructor-Led Training

Duration: 5 days

Price: £2,495.00 exc. VAT 


Start Date Options Spaces  
13 Jan 2025
StayAhead Virtual Courses available 
Spaces Book Now 
24 Feb 2025
StayAhead Virtual Courses available 
Spaces Book Now 
07 Apr 2025
StayAhead Virtual Courses available 
Spaces Book Now 
02 Jun 2025
StayAhead Virtual Courses available 
Spaces Book Now 
21 Jul 2025
StayAhead Virtual Courses available 
Spaces Book Now 
08 Sep 2025
StayAhead Virtual Courses available 
Spaces Book Now 
27 Oct 2025
StayAhead Virtual Courses available 
Spaces Book Now 
 

Live Virtual Classroom

 
Join live instructor-led classroom training from the comfort of your home or office.
All the convenience and benefits of the classroom experience without the hassle and costs of travel and accommodation.
 
 



Our Customers Include

 
EDF
Amazon
American Express
Aviva
QA
BAE
University of Cambridge
Barnardo's
Scottish Government
Bauer
Bloomberg
BP
HSBC
DVLA
GlaxoSmithKline
Government Campus
Capita
Tui
NHS
Ordnance Survey
Ministry of Defence
Zurich Insurance Group
trainline
Vodafone
 
 



Our Course Curriculum

 
 
 
+44 (0)20 7600 6116
Enquiries@StayAhead.com
Copyright © 2024 StayAhead Training Ltd
Cookies   /   Privacy Policy