0845 450 6120

PostgreSQL Administration

This PostgreSQL Administration course covers administration, maintenance, security and performance tuning of PostgreSQL databases.

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

The delegate will gain an understanding of:

  • Install PostgreSQL
  • Create a database
  • Manage roles and privileges
  • Manage schemas
  • Transaction handling and concurrency
  • Examine statistics and system tables
  • Manage tablespaces
  • Scale PostgreSQL using table inheritance and partitioning
  • Understand error reporting and logging
  • Security features of PostgreSQL
  • Encrypt sensitive data
  • Carry out periodic maintenance with 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
  • Set up asynchronous and synchronous replication

Who will the Seminar 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 databases. This course is suitable for users of both PostgreSQL 9 and 10 databases.

Learning Objectives

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.

Pre-Requisites

Requirements

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

This course is run on a Linux operating system, a basic knowledge of UNIX/Linux is recommended but is not essential.

Pre-Requisite Courses

  • SQL for PostgreSQL

Follow-On Courses

  • Python Programming 1
  • PHP Programming
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.

Course Content

Day 1

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
  • PostgreSQL Processes
  • How Data is Processed by PostgreSQL
  • PostgreSQL Directory Structure
  • Manage a PostgreSQL Instance
  • Automate the Startup of PostgreSQL at Boot Time
  • 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
  • The pgAgent 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

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

Day 2

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
  • Locking Concepts
  • Levels of Transaction Isolation
  • Atomic Changes
  • Explicit and Implicit Table Locking
  • Transaction Control
  • Lock Management Parameters
  • Locking and Indexes

Session 10: POSTGRESQL DATABASES STRUCTURE

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

Day 3

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
  • Delete a Tablespace

Session 12: POSTGRESQL LOGGING

  • The Principles and Usages of Logging
  • PostgreSQL Log Destinations
  • Logging Parameters
  • Error Reporting and Logging
  • What Should be Logged and When
  • CSV Format Log Output

Session 13: CONTROL ACCESS TO THE SERVER

  • Security Labelling
  • Secure TCP/IP Access with OpenSSL
  • Secure TCP/IP Connections with SSL
  • Create Secure SSH Tunnels

Session 14: DATA ENCRYPTION

  • Encryption Options
  • Encrypt Specific Columns with the pgcrypto Module
  • Data Partition Encryption
  • The Performance Implications of Encryption

Day 4

Session 15: 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
  • Restore a Database with pgAdmin
  • Filesystem Backup

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

  • Overview of PITR
  • Continuous Archiving
  • Overview of PostgreSQL Write-ahead Logs
  • List the Transaction Logs
  • Checkpoints
  • Transaction Log Optimisation
  • Setup PITR
  • Creat an Initial Base Backup
  • Exclusive and Non-Exclusive Low Level Backups
  • Test Transaction Log Archiving
  • Replay Transaction Logs
  • Archive Recovery Settings
  • Timelines
  • Archive Target Settings Parameters
  • Locating the Correct Timestamp
  • Clean up the Transaction Logs

Session 17: THE POSTGRESQL QUERY OPTIMIZER

  • Query Optimization
  • Optimization Ooperations
  • Optimization Decisions
  • Join Methods
  • Statement Transformation
  • Use EXPLAIN PLAN to optimize Queries and Indexes
  • Execution Plans
  • The Statistics used by the Planner and the ANALYZE Command
  • Query Planner Statistics
  • Control the Planner with Explicit Join Clauses
  • Detect Slow Queries
  • Parameters Affecting Optimization

Session 18: POPULATE A DATABASE EFFICIENTLY

  • DISABLE autocommit
  • Configure Variables for Increased PerformanceUse 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

Day 5

Session 19: SERVER PERFORMANCE TUNING AND MONITORING

  • Optimize Storage and Manage Cleanup with VACUUM
  • Monitor Database Activities
  • Statistics Collection
  • Set postgres.conf Cache Parameters

Session 20: ASYNCHRONOUS AND SYNCHRONOUS REPLICATION

  • Overview of Basic Synchronous Replication
  • Set up Asynchronous Replication
  • Start Replication
  • Create a Remote User for Streaming
  • Halt and Rehck Replication to Ensure Availability
  • Perform Failovers
  • Understand Timelines
  • Manage Conflicts
  • Use Replication Slots

Session 21: CLIENT CONNECTIONS

  • Overview of Client Interfaces
  • The ODBC Driver for PostgreSQL
  • PostgreSQL JDBC
  • PostgreSQL PHP
  • PostgreSQL Python

One Month
Two Months
Three Months
More than Three Months
PRINCE2 Foundation & Practitioner
MSP Foundation & Practitioner
APMP Certificate
ITIL Foundation
Scrum in One Day
Certified ScrumMaster
ISTQB Software Test Foundation
Microsoft Project
BCS Business Analysis Practice
Other - Please Specify Below

Online Courses

You may prefer an online course if you are looking for a flexible and cost-effective solution. Online courses allow you to study at your own pace, at a time that suits you.

We have the following eLearning options available:

Our Customers Include