
Learn PostgreSQL replication fundamentals, including master–slave configuration and warm and hot standby. See how replication enables high availability, load balancing, disaster recovery, and data migration by keeping standby in sync.
Explore master/slave configuration and distinguish warm standby from hot standby, implementing one-way replication from primary to standby and enabling read-only access on standby.
Explore asynchronous and synchronous replication modes and how they affect data availability. Recognize replication lag in asynchronous mode and the 100% data protection in synchronous mode, with potential performance trade-offs.
Explore replication models in PostgreSQL database administration: single master unidirectional replication and bidirectional multi-master replication, including conflict resolution schemes and primary keys.
Set up log-based shipping standby on Windows by enabling archive mode and archive_command to copy wal files to a shared archive dir, and prepare master and standby with admin privileges.
Learn to set up log shipping for PostgreSQL on Windows, configure backup mode, copy data to standby, enable standby mode, and validate asynchronous wal file replication.
Set up log shipping standby on linux by configuring ssh key based access, rsync transfers, and archive parameters (archive_mode, archive_command, archive_timeout) across master and standby.
Demonstrates manual failover from master to standby in a log-based shipping setup. Promotes the standby with pg_ctl, verifies the new master accepts connections and write operations, and explains reconnecting applications.
Learn to set up streaming replication on linux, configure master and standby, create a replication user, adjust postgresql conf and pg_hba, perform a base backup, and verify real-time WAL streaming.
Monitor streaming replication in PostgreSQL using generic views like pg_stat_replication to track master and standby communication, lag, and LSNs, and verify recovery mode and current WAL status.
Exercise : Revert New Standby back as primary. Document Attached
Learn how to add a new standby to a PostgreSQL cluster, configure it to follow the primary, manage automatic failover with node priority, and rejoin after failures.
A witness server acts as a referee for a PostgreSQL primary–standby, not part of replication or the cluster, preventing split-brain by confirming primary availability and guiding promotions.
Configure and customize event notification using rpm conf file parameters to monitor events, trigger scripts or emails on node promotions, rejoin, and switchover, and log for DBA oversight.
Learn how repmgr monitoring tracks replication lag, wal delay, and node health using the monitoring history table. Compare event notification with proactive background monitoring that logs cluster metrics.
Set up logical replication between Windows source and Linux destination by configuring wal_level and listen address, creating a publication and subscription, and checking status.
Add a new table to an existing publication in PostgreSQL logical replication, then refresh the subscription to propagate and verify replication; you can restrict the publication to inserts and updates.
Explore PostgreSQL 15's logical replication enhancements, including alter subscription skip, column-level and schema-wide publications, row-filtered replication, disable on error, and new error stats view.
Discover PostgreSQL 16's logical replication enhancements, including standby-based replication, parallel subscription processing, binary initial load, bidirectional replication, and new pg_create_subscription role.
Demonstrate bidirectional replication with postgresql 16 on two linux boxes, using publications and subscriptions to enable multi-master replication and illustrate how to stop the infinite loop.
Learn how to configure bidirectional replication in PostgreSQL 16, avoid infinite loops by using origin none and replica identity full, and validate with cross-node inserts and log checks.
Explore binary copy in PostgreSQL 16 for fast initial data load from master to target. Benefit from binary format that improves performance up to 30–40% with matching data types.
Explore PostgreSQL 16 logical replication with publications and subscriptions, compare text and binary initial sync times (29 seconds vs 21 seconds), and highlight binary copy as a major performance improvement.
Configure streaming to parallel with multiple background workers to speed up applying changes to the subscription. Use max parallel apply per subscription to tune performance.
Explore parallel apply in PostgreSQL 16 by creating a publication and subscription, increasing max apply workers, and comparing streaming parallel performance with 3 million inserts.
PostgreSQL 16 introduces logical replication from standby, enabling standby to become a source for publications and subscriptions while streaming replication remains between primary and standby for workload distribution.
PostgreSQL is an advanced, enterprise class open source Object-Relational Database Management System (ORDBMS). Its is a relational database that supports both SQL (relational) and JSON (non-relational) querying.
PostgreSQL possesses robust feature sets including Multi-Version Concurrency Control (MVCC), point in time recovery, granular access controls, tablespaces, asynchronous replication, nested transactions, online/hot backups, a refined query planner/optimizer, and write ahead logging. It supports international character sets, multi-byte character encodings, Unicode, and it is locale-aware for sorting, case-sensitivity, and formatting. PostgreSQL is highly scalable both in the quantity of data it can manage and in the number of concurrent users it can accommodate.
The course provides the learner with an extensive knowledge of PostgreSQL Database Administration with real time examples.
Topics covered are:
Introduction to Replication & It's Terminalogies
Master and Slave Configuration
Warm & Hot Standby
Types of Replication
Modes of Replication
Models of Replication
Log Based Shipping Standby Initial Setup
Log Based Shipping Standby on Windows and Linux
Log Based Shipping Standby Failover
Streaming Replication Setup
Monitoring Streaming Replication
Synchronous Streaming Replication
Configure Physical Replication Slots
Failover Streaming Replication
Repmgr – Replication Manager
Automatic Failover using Repmgr
Node Rejoin of Failed Primary
Add New Node and Standby Follow
Switch Over From Primary to Standby
Cascading Streaming Replication
Witness Server
Event Notification System
Repmgr Monitoring
Upgrade Replication Manager
Uninstall Replication Manager
Logical Replication Setup
Publication and Subscription
Logical Replication Slots
Add Table to Publication
Refresh Subscription
Cascading Logical Replication
Uninstall Publication and Subscription.
Tune PostgreSQL Server parameters
Shared Buffers
Work_Mem
Maintenance_Work_Mem
Postgresql V15 - New Features (Logical Replication)
Postgresql V16 - New Features