Conference Schedule - PGCon 2023

Logical Replication - handling of large transactions

Date: 2023-05-31
Time: 14:00–14:45
Room: DMS 1140
Level: Intermediate

Logical replication of large transactions consumes a lot of resources (memory and disk space) on the publisher, and the application may be delayed because the subscriber only starts to apply changes after receiving the final commit. Finding ways to improve the processing of replicating large transactions in PostgreSQL has always attracted attention.

In this talk we will describe how large transactions get decoded on the publisher, and how such transactions are then applied on the subscriber. We will demonstrate how to use existing (PG14+) features to improve the handling of large transactions by explaining the internals of logical_decoding_work_mem and streaming transaction mode. Next, we will introduce the new "parallel apply" feature that is being developed for PG16+ – this feature allows large transactions to be applied using subscriber-side parallel workers which significantly improves performance (up to 40%). Finally, we will present some ideas for future enhancements (such as adapting the parallel apply feature to support small transactions).

link to video

Slides

The following slides have been made available for this session:

Speaker

Hayato Kuroda
Hou Zhijie