Canfor
50-Minute Talk
Logical replication is an essential tool for modern PostgreSQL environments, yet it often struggles to match the throughput of physical streaming replication. As write-heavy workloads scale, the current architecture faces two primary bottlenecks: the serialized nature of the apply process and the redundant CPU/IO cost of decoding the same WAL multiple times for different consumers.
In this session, we examine the internal mechanics of these bottlenecks and the ongoing efforts to overcome them. We will focus on two major architectural shifts:
Parallel Apply: We will discuss the implementation of concurrent transaction execution on the subscriber. This includes the logic required to maintain transactional atomicity and the complex challenge of managing commit ordering and dependencies across parallel workers.
Centralized Decoding: An exploration of a "decode once, serve many" model. By sharing Logical Change Records (LCRs) across multiple wal_sender processes, we can significantly reduce the resource footprint on the primary node and eliminate the inefficiency of re-reading and re-decoding the same WAL segments for different downstream consumers. This section will cover the high-level ideas and key challenges in moving to this architecture.
Attendees will walk away with a technical understanding of these emerging features, their impact on PostgreSQL internals, and performance benchmarks with a work-in-progress patch for parallel apply.

