Section 1: Processes, Memory and the Write-Ahead Log
- The postmaster, backend processes and background workers (checkpointer, background writer, WAL writer, autovacuum launcher)
- Shared buffers, work_mem and maintenance_work_mem, and how each uses server resources
- How WAL, checkpoints and full page writes work, and how they tie into backup and replication
- The PostgreSQL versioning policy: one major release a year and 5 years of support
Section 2: MVCC, Transaction Isolation and Locking
- Tuple visibility (xmin/xmax) and why PostgreSQL needs VACUUM
- Read Committed, Repeatable Read and Serializable, and their effect on applications
- Conflicting row and table lock modes, and inspecting them with pg_locks
- Lab: demonstrate lock waits and anomalies at each isolation level
Section 3: Lab: Linux Essentials for Database Work
- Manage services with systemd and read logs with journalctl
- Check disk space and I/O with df, du and iostat, and inspect memory and processes
- Users, file permissions and secure SSH key access
- Lab: health-check an Ubuntu 24.04 server before installing the database
Section 4: Lab: Installing and Tuning PostgreSQL 17
- Install from the PGDG repository on Ubuntu 24.04 and use the postgresql-common tools (pg_lsclusters, pg_ctlcluster)
- Enable data checksums when the cluster is created, and why you should
- postgresql.conf, pg_hba.conf and ALTER SYSTEM, tuning memory, checkpoint and autovacuum settings to the server size
- Managing extensions and what to watch for during upgrades
- Lab: tune the primary node against a production checklist
Section 5: Workshop Day 1: Connections, Privileges and PgBouncer
- Why a high max_connections is dangerous, and PgBouncer session, transaction and statement pooling
- Role hierarchies with least privilege, and the pg_maintain role added in PostgreSQL 17
- SCRAM-SHA-256 authentication and enabling SSL/TLS
- Workshop: create application, read-only and admin roles for NovaMart, enable TLS and deploy PgBouncer
- Measure with pgbench before and after connection pooling