In my last article, I examined the concept of replication methods in PostgreSQL and provided an overview of the main characteristics of logical replication incorporated into PostgreSQL 16. Now, I am going to explore the performance features associated with logical replication, showcase the steps for observing these features in real time, and share the outcomes of performance benchmarking.

I want to spotlight two specific features of PostgreSQL 16 — parallel apply and binary copy. The parallel apply feature extends the capability to utilize parallel background workers at the subscriber node to facilitate the application of changes in large ongoing transactions. The specification of the number of parallel workers that should be engaged for assimilating changes from the publisher is determined by max_parallel_apply_workers_per_subscription. The binary copy, the second performance feature, permits logical replication to conduct the initial data copy in a binary format. This significantly enhances performance, particularly when copying tables containing binary columns.

Leave a Reply

Your email address will not be published. Required fields are marked *