Original course edition. All 80 lessons are now organized on CodeWithLucian, with six available as a free preview.

Secure checkout

PostgreSQL course Β· 80 lessons

PostgreSQL Replication, High Availability and Scalability

Assess your scaling needs and learn how to combine replication, load balancing, connection pooling, partitioning, sharding, and failover to build scalable, highly available PostgreSQL systems.

Trusted by 3,200+ students in the original Udemy edition.

Level
Intermediate+
Runtime
3h 09m
Modules
9
PostgreSQL database nodes connected in a high-availability cluster

Course overview

See PostgreSQL scaling as one connected system

The course connects the individual techniquesβ€”from replication and pooling to sharding and failoverβ€”so you can understand what problem each one solves and where it fits.

01

Scaling advice feels fragmented

Replication, pooling, partitioning and sharding are often taught independently, making it difficult to see how they fit together.

02

Read and write bottlenecks need different answers

A technique that helps read traffic may do little for write-heavy workloads or operational recovery.

03

High availability is more than adding a replica

Failover, routing and restoration need to work together before a database setup is genuinely resilient.

04

The tooling can hide the architecture

Hands-on configuration is useful only when you also understand the role and limits of every component.

What you will learn

Move from a single database to a resilient architecture

Build a practical mental model for selecting and combining PostgreSQL scaling techniques.

  • βœ“Recognize when PostgreSQL needs vertical scaling, read scaling or write distribution.
  • βœ“Build physical and logical replication setups and understand their trade-offs.
  • βœ“Use PgBouncer and Pgpool-II to manage connections, reads and failover.
  • βœ“Connect partitioning, sharding and high availability into one practical scaling strategy.

The learning path

From workload evidence to recovery

The modules follow three broad decisions: understand the workload, build the data layer and prepare the system for failure.

PART 01

Choose a scaling direction

Start from workload evidence, then choose between scaling up, replication, pooling, partitioning and sharding.

  • β†’ Workload statistics
  • β†’ CAP trade-offs
  • β†’ Read vs. write scaling
PART 02

Build the data layer

Configure replication, connection pooling, cloud read scaling and data distribution techniques.

  • β†’ Streaming replication
  • β†’ Logical replication
  • β†’ PgBouncer and Google Cloud
PART 03

Design for failure

Turn availability requirements into routing, failover and recovery decisions you can operate.

  • β†’ RTO and RPO
  • β†’ Automatic failover
  • β†’ Pgpool-II recovery

Course experience

What's inside

A complete migration of the original course, delivered through the same secure learning experience as the System Design course.

Complete course

80 focused lessons

The original course edition, organized into a clear CodeWithLucian path.

Runtime

3 hours 9 minutes

Short lessons make individual topics easy to revisit.

Video quality

Up to 1080p

Adaptive Bunny Stream playback with English captions.

Knowledge checks

47 lesson quizzes

Get immediate feedback and saved attempts; six lesson-and-quiz previews remain free.

Hands-on pack

5 guided exercises

Download a tested PostgreSQL 18 lab, SQL exercises and practical configuration runbooks.

Course access

Lifetime ownership

Return to the lessons, quizzes and protected resource pack from your account.

Course curriculum

Nine modules. Eighty focused lessons.

The curriculum preserves the original Udemy course order and groups every uploaded video into a clear learning path.

01

PostgreSQL Scalability Foundations

Understand the workload signals and architectural options that guide PostgreSQL scaling decisions.

  • β†’ Why Scale PostgreSQL?
  • β†’ Vertical Scaling
  • β†’ Horizontal Scaling
  • β†’ CAP Theorem Explained
  • β†’ PostgreSQL vs. NoSQL
  • β†’ Use case: Consistent and Available System
  • β†’ Use case: Available and Partition-tolerant System
  • β†’ Read Versus Write Bound Workload
  • β†’ How statistics will answer to all questions?
  • β†’ Enable Statistics
  • β†’ Replication
  • β†’ Load Balancing
  • β†’ Connection Pooling
  • β†’ Queuing
  • β†’ Partitioning
  • β†’ Sharding
  • β†’ Multi-master
02

Streaming Replication

Build and verify a primary and replica setup with streaming replication.

  • β†’ What is Streaming Replication?
  • β†’ Asynchronous vs. Synchronous Replication
  • β†’ Hands-on - Initialise Primary Database
  • β†’ Configuring the Primary for Replication
  • β†’ Configuring the Replica Instance
  • β†’ Testing Replication Setup
03

Logical Replication

Replicate selected data between PostgreSQL servers and understand the best use cases.

  • β†’ What is Logical Replication in Postgres?
  • β†’ Setting-up Postgres Servers for Logical Replication
  • β†’ Selective Copy of the Data
  • β†’ Create the Publication
  • β†’ Create the Subscription
  • β†’ Limitations of Logical Replication
  • β†’ Monitoring Logical Replication
  • β†’ Best use-cases for Logical Replication
04

Connection Pooling with PgBouncer

Configure, tune and benchmark PostgreSQL connection pooling.

  • β†’ Introduction
  • β†’ Fundamental concepts of connection pooling
  • β†’ Building a PgBouncer Setup
  • β†’ Installing and Configure PgBouncer
  • β†’ Creating a basic configuration file for PgBouncer
  • β†’ Connecting to PgBouncer
  • β†’ Advanced Settings for Performance
  • β†’ Pool Modes
  • β†’ A simple benchmark
05

Scaling PostgreSQL on Google Cloud

Create a PostgreSQL read-scaling setup with HAProxy load balancing.

  • β†’ Introduction
  • β†’ Key Components
  • β†’ Key Characteristics of the Architecture
  • β†’ Creating PostgreSQL Instances on Google Cloud
  • β†’ Creating a GCE for HAProxy
  • β†’ Configure HAProxy for Load-Balancing
  • β†’ Testing Load-Balancing
06

PostgreSQL Table Partitioning

Choose suitable tables and apply PostgreSQL partitioning methods.

  • β†’ Introduction
  • β†’ Which Tables Need Partitioning?
  • β†’ How should the Tables be Partitioned?
  • β†’ Declarative vs. Inheritance Partitioning
  • β†’ Creating a Partitioned Table
  • β†’ Partitioning Methods
07

PostgreSQL Sharding

Distribute data and reason about shard keys, resharding and cross-shard queries.

  • β†’ Introduction
  • β†’ Pain Points of Sharding
  • β†’ How to Partition Data in PostgreSQL
  • β†’ Second Level Sharding
  • β†’ Querying Across Shards
08

PostgreSQL High Availability

Turn availability requirements into replication, failover and recovery decisions.

  • β†’ Why High Availability?
  • β†’ Steps to achieve High Availability
  • β†’ Essential Questions to set-up High Availability
  • β†’ Log-Shipping Replication
  • β†’ Streaming Replication and Logical Replication
  • β†’ Cascading Replication
  • β†’ Synchronous vs. Asynchronous Replication
  • β†’ Automatic Failover and Always-on Strategy
  • β†’ Simple HA Solution Example
  • β†’ Better HA Solution Example
09

Load Balancing and Failover with Pgpool-II

Configure read routing, failover testing and recovery of failed nodes.

  • β†’ Introduction
  • β†’ Pgpool-II Features
  • β†’ Configure Pgpool-II with Streaming Replication
  • β†’ Setting up Streaming Replication
  • β†’ Configuring Pgpool-II for Load Balancing
  • β†’ Testing load-balancing & read/write separation
  • β†’ Configure Pgpool for PostgreSQL High-Availability
  • β†’ Configuring PostgreSQL Primary Server
  • β†’ Configuring Pgpool-II Server
  • β†’ Configuring PostgreSQL Replica Server
  • β†’ Testing The Failover
  • β†’ Restoring failed nodes

Course format

Short lessons for practical review

Move through the complete path or return directly to the technique you need when a PostgreSQL scaling decision appears in your work.

  • βœ“80 concise video lessons with English captions.
  • βœ“47 lesson quizzes with immediate feedback and retry.
  • βœ“Downloadable PostgreSQL 18 lab, SQL exercises and configuration runbooks.
  • βœ“Secure adaptive video playback up to 1080p.
  • βœ“Saved lesson progress when you sign in.

The right fit

Who is this course for?

The course assumes basic PostgreSQL familiarity and focuses on architecture, configuration and operational trade-offs.

  • βœ“Backend engineers who already use PostgreSQL and need a broader scaling map.
  • βœ“Developers preparing to work with replication, pooling or database failover.
  • βœ“Engineers who want practical demonstrations alongside architectural concepts.
  • βœ“Technical interview candidates reviewing PostgreSQL scalability and availability.

Student stories

What PostgreSQL learners say

Feedback from students who studied the original course edition before it moved to CodeWithLucian.

β€œ
The way you explained the theory made it very clear, and the hands-on exercises, though short, were practical and effective.

Kerian

Originally published on Udemy

β€œ
The things are not difficult to understand and one can easily practice.

Godson Nyuyse Tanyi

Originally published on Udemy

β€œ
The course content is very good, it managed to introduce me to several new things and held my attention throughout the course.

Guilherme

Originally published on Udemy

β€œ
The way the units are split favors advancing quickly. I am using it to prepare for a work interview.

Fernando Solar

Originally published on Udemy

β€œ
Short and to the point! In just 3 hours a very good, practice-oriented introduction to the most important tools with demonstrations in each section.

Gernot

Originally published on Udemy

β€œ
The instructor covered various replication methods and failover techniques clearly, and the hands-on demonstrations made it easy to follow along.

Muhammad

Originally published on Udemy

β€œ
A clear and good overview, good slides ... and code instructions that work perfectly in Windows Subsystem for Linux with Ubuntu.

Stephan

Originally published on Udemy

β€œ
Above expectations, clear and fast on the real world topics.

Heider

Originally published on Udemy

One-time purchase

Lifetime access for $65

Purchase the complete 80-lesson course once and keep it in your CodeWithLucian account. You can still preview six representative lessons before checkout.

  • One payment
  • Lifetime access
  • English captions
  • Hands-on resource pack
  • 6 free preview lessons
  • 15-day refund policy
  • Secure checkout by Stripe

Complete course

$65

One payment

Or start the free preview β†’

Questions

Frequently asked questions

The essential details about this first CodeWithLucian edition.

How long is the course?

The course contains 80 lessons across nine modules and runs for approximately 3 hours and 9 minutes.

Can I preview the course?

Yes. Six lessons covering foundations, replication, pooling, partitioning and high availability are available as a free preview.

Is this a newly recorded course?

This is the original course edition migrated to CodeWithLucian. A separate technical refresh may be produced later.

Are English captions available?

Yes. Every uploaded lesson has an English caption track in Bunny Stream.

How does purchase access work?

The course is a one-time purchase with lifetime access through your CodeWithLucian account and a 15-day refund policy.

How do I request a refund?

Email info@high-performance.dev within 15 days of purchase and include the email address used at checkout. After the refund is issued, access to the course is removed from your account.

What support is included?

Email support is available for purchase, access and course-content questions. The purchase does not include private consulting, an architecture review or debugging of your production environment.

Which PostgreSQL versions and tools does the course use?

This is the original course edition and its screens and commands reflect the tool versions available when it was recorded. It covers PostgreSQL together with PgBouncer, Pgpool-II, HAProxy and Google Cloud examples. The architectural ideas remain useful, but you should verify version-specific commands against the current official documentation before using them in production.

Are quizzes included?

Yes. The course includes 47 lesson quizzes with 52 reviewed questions, immediate feedback, explanations and saved attempts when you sign in. Preview quizzes follow the same access rules as their lessons.

Are downloadable scripts or additional resources included?

Yes. Course owners can download a hands-on resource pack from the relevant lessons. It includes a tested PostgreSQL 18 logical-replication lab, monitoring and partitioning SQL exercises, and configuration runbooks for PgBouncer and physical streaming replication. The pack is a learning companion, not production-ready infrastructure.

What is not included in this course?

This focused course is not a complete production-operations bootcamp. It does not include an end-to-end infrastructure project, managed-cloud runbooks, production hardening for every environment, private consulting or ongoing operational support.

Lucian Oprea

Your instructor

Meet Lucian Oprea

Lucian is a backend software engineer and educator focused on databases, system design, Java and practical engineering decisions.

More about Lucian β†’

Continue learning

Start with the architecture that fits your workload.

Start with six free lessons or unlock the complete PostgreSQL scaling path for a single payment.

Start free preview