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 and 14 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 and 14 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 and Hash Indexes
  • Single Column Indexes
  • Multicolumn Indexes
  • Index Based Expressions
  • Partial Indexes
  • 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 User Credentials
  • Backup All Databases with pg_dumpall
  • Backup Database Object Definitions
  • Backup databases with pg_Admin
  • 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
  • Locating the Correct Timestamp
  • 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

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 - September 2023

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 - May 2023

I found the course very interesting and very well paced. Tarn was an excellent instructor, very friendly and approachable, and very knowledgeable. I feel I have been given a very good grounding in Postgres and at the same time have the tools to deepen my knowledge.

Graham - Senior Applications Engineer - IT - April 2023

I really enjoyed this course. Course was perfectly customized to meet our needs at work place. Trainer was very professional and had in depth knowledge of the subject.

Ravindra - DBA - IT - April 2023

Tarn was excellent, the fact he knew Oracle and other databases and was able to relate concepts and experiences to PostgreSQL was a huge bonus.

Satbinder - IT - April 2023

Outside of the fact I am in the States and it required me to be up very early for 5 days, I don't regret it for a minute. The course was outstanding. The instructor could not have been better. I have been in IT for 44 years, have taught courses myself, taken many, and believe this was the best course I have ever taken. The material was spot on and all relevant. The labs were perfect and just the right amount. I could not be happier with the knowledge gained and hope I can attend the advanced course in the near future. Thank you again!

John - DBA - Automotive

Public Scheduled Events

Classroom & Live Virtual Instructor-Led Training

Duration: 5 days

Price: £2,495.00 exc. VAT 


Start Date Options Spaces  
29 Apr 2024
StayAhead Virtual Courses available 
Spaces Book Now 
10 Jun 2024
StayAhead Virtual Courses available 
Spaces Book Now 
05 Aug 2024
StayAhead Virtual Courses available 
Spaces Book Now 
23 Sep 2024
StayAhead Virtual Courses available 
Spaces Book Now 
11 Nov 2024
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