Database Internals & Event-Driven Architecture

Database Internals & Event-Driven Architecture

In-depth Big-Tech software architecture articles on Database Internals & Event-Driven Architecture by Duong Phuc Khanh (khanhdp · Kido). (Total 1 in-depth engineering monographs & publication essays).

Deconstructing PostgreSQL Logical WAL CDC: Two-Phase Peek-then-Ack, LSN Coalescing, and the Architectural Boundaries Between Message Queues and CDC Streams
Database Internals & Event-Driven Architecture
Nov 9, 2026•16 min read

Deconstructing PostgreSQL Logical WAL CDC: Two-Phase Peek-then-Ack, LSN Coalescing, and the Architectural Boundaries Between Message Queues and CDC Streams

An architectural deep-dive into real-time database synchronization via PostgreSQL Logical WAL CDC: eliminating Dual-Write inconsistencies, demystifying the Queue vs. CDC boundary matrix, implementing a lightweight Two-Phase Peek-then-Ack slot poller (<15MB RAM), burst LSN coalescing, and pg_wal disk-full circuit breaking.