The talk followed a single INSERT end to end, from WAL generation and logical decoding to transaction reconstruction and application on the subscriber, offering clear insight into how PostgreSQL turns low-level WAL records into replicated changes.

How Logical Replication works under the hood
This session explored how data changes flow through PostgreSQL’s logical replication system, focusing on the lifecycle of a tuple, from its creation on the publisher to its application on the subscriber.
It began with an overview of logical replication architecture, covering publications, subscriptions, replication slots, and processes such as the walsender and apply worker. The session also explained how replication is set up internally when the CREATE PUBLICATION and CREATE SUBSCRIPTION commands are executed.
Building on this foundation, the talk followed the journey of a tuple using an INSERT statement as an example. It demonstrated how WAL records are generated, decoded into logical changes, processed through components such as the ReorderBuffer and output plugins (e.g., pgoutput), transformed into replication protocol messages, and finally received and applied on the subscriber node.
Technical areas covered in the session
The following highlights summarize the key concepts and internal processes discussed during the session:
- Overview of PostgreSQL logical replication architecture
- Internal setup of publications and subscriptions
- WAL generation and its role in capturing data changes
- Logical decoding of WAL into meaningful operations by Walsender
- Role of ReorderBuffer in reconstructing transactions
- Use of output plugins (such as pgoutput) for formatting changes
- End-to-end flow of a tuple from publisher to subscriber
- Application of changes on the subscriber using the apply workers
Life of a tuple in Logical Replication





































Takeaways from PGConf India 2026
PGConf India 2026 was a well-organized and engaging event, bringing together contributors, developers, and industry professionals from the PostgreSQL ecosystem.
There was a wide variety of talks covering diverse topics. I was particularly interested in PostgreSQL internals and attended several sessions in that area, which provided a great learning experience. I also engaged in insightful discussions with fellow participants on a range of topics, both related and unrelated to my talk, where attendees shared practical experiences and real-world challenges, making the interactions highly valuable.
It was great to observe growing participation and enthusiasm around PostgreSQL technologies.
Photo gallery




