Post Content
What really happens to an INSERT in PostgreSQL once it enters the system? Hamid Akhtar (Microsoft) walks through this in his talk “Where Does My INSERT Go? A Logical Replication Story” at POSETTE: An Event for Postgres 2026. Abstract: What really happens to a single INSERT in PostgreSQL once it enters the system? In this talk, we trace the complete lifecycle of one tuple as it travels through PostgreSQL’s logical replication pipeline. Starting at the executor, we watch the tuple become a WAL record, explore what changes when wal_level=logical, and reveal how the logical decoding layer reconstructs row-level changes from low-level WAL fragments. We’ll step through the inner workings of the ReorderBuffer, explain how replication slots guarantee durability, and show how output plugins convert decoded changes into a logical stream ready for subscribers.
On the receiving side, we follow the apply worker as it processes transactions, resolves ordering, handles conflicts, and replays the change into the subscriber database. By the end, you’ll have a clear mental model of each stage—from WAL generation to apply—and a deeper understanding of how PostgreSQL reliably moves data through logical replication.
Whether you run logical replication, build CDC pipelines, or simply want to understand the internals behind one of PostgreSQL’s most powerful features, this talk will give you a guided, intuitive, and highly practical look behind the scenes.
Hamid Akhtar is a Senior Software Engineer at Microsoft, specializing in PostgreSQL internals and large-scale data replication. Over the years, he has worked hands on across various aspects of the PostgreSQL ecosystem, including core database features, extension development, performance, security, and observability. Before joining Microsoft, Hamid served as an architect and senior developer across multiple PostgreSQL-focused organizations. His past work includes multi-active (active-active) replication with pgEdge’s Spock, Transparent Data Encryption (TDE), the pg_stat_monitor observability extension, the ORC FDW, and an auto-tuning framework for PostgreSQL. He also led the development and maintenance of the official PostgreSQL installers.
► Video chapters:
⏩ 00:00 – Music & introduction
⏩ 00:41 – Roadmap: end-to-end replication flow
⏩ 01:53 – From SQL insert to heap tuple
⏩ 04:00 – Writing data into shared buffers
⏩ 05:23 – WAL creation and durability explained
⏩ 07:06 – Inside a WAL record and crash safety
⏩ 09:02 – Logical vs physical replication differences
⏩ 11:27 – WAL sender and logical decoding layer
⏩ 14:07 – Reordering transactions with reorderbuffer
⏩ 20:14 – The commit triggers decoding and plugins
⏩ 24:18 – Applying changes on the subscriber
⏩ 25:11 – End-to-end journey recap
📕 Everything you need to know about POSETTE: An Event for Postgres can be found at: https://posetteconf.com
✅ Learn more: watch more POSETTE talks: https://aka.ms/posette-playlist
📌 Let’s connect:
LinkedIn: https://www.linkedin.com/company/posetteconf/
X – @PosetteConf, https://x.com/PosetteConf
Mastodon – @posetteconf, https://mastodon.social/@posetteconf
Bluesky – @posetteconf.com, https://aka.ms/posette-on-bluesky
#PosetteConf #PostgreSQL #database Read More Microsoft Developer