<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=2826169&amp;fmt=gif">
Start  trial

    Start trial

      At PGConf India 2026, I presented a technical deep dive into how PostgreSQL processes data changes internally using logical replication.
      My session traced a tuple’s journey, from the publisher to the subscriber, providing a clear view of the key components involved in this process.

      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.

      Check how PostgreSQL handles Logical Replication, tracing the journey of data changes from publisher to subscriber

      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

      Side by sideClick to view the slides side by side
      Top to bottomClick to view the slides in vertical orientation

      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

       

       

       

      Topics: PostgreSQL, Logical replication, Database replication, PGConf India, PostgreSQL logical replication features, Logical Replication architecture, PostgreSQL replication internals, Tuple flow in PostgreSQL Logical Replication, Deep dive into PostgreSQL Logical Replication, PostgreSQL internals, How PostgreSQL Logical Replication works internall, PostgreSQL Logical Replication internals explained, Tracking changes with PostgreSQL logical decoding

      Receive our blog

      Search by topic

      see all >
      Shlok Kyal
      Application Developer, Fujitsu OSS PostgreSQL team
      Shlok Kyal is an Associate Application Developer at Fujitsu, where he contributes to the open-source PostgreSQL team, focusing on logical replication.

      Before joining Fujitsu, Shlok served as a Software Development Engineer at Amazon, gaining valuable experience in database internals and Transact-SQL (T-SQL). Beyond his professional endeavors, Shlok actively contributes to improving the performance of Babelfish, demonstrating his commitment to community-driven open source development.
      roundel-owl-and-book-01PostgreSQL Insider 
      has a series of technical articles for PostgreSQL enthusiasts of all stripes, with tips and how-to's.
      Explore PostgreSQL Insider >
      Subscribe to be notified of future blog posts
      If you would like to be notified of my next blog posts and other PostgreSQL-related articles, fill the form here.

      Read our latest blogs

      Read our most recent articles regarding all aspects of PostgreSQL and Fujitsu Enterprise Postgres.

      Receive our blog

      Fill the form to receive notifications of future posts

      Search by topic

      see all >