Unconference - Stream 3 - 11:15-12:15 - PGCon 2022

Improve the performance of PostgreSQL logical replication by optimizing CPU usage, reducing contention, and improving scheduling through configuration, testing, and benchmarking.

Key takeaways
  • Logical replication performance can be improved by optimizing CPU usage, reducing contention, and improving scheduling.
  • The wall sender process can be optimized by parallelizing tasks, using connection pooling, and pinning threads or processes to specific CPU cores.
  • Cgroups can be used to limit CPU usage and improve scheduling, but this may require additional configuration and testing.
  • Logical replication built into PostgreSQL core, in-core logical replication, and PG logical replication all suffer from similar performance issues.
  • Benchmarking and profiling can help identify areas for improvement and optimize performance.
  • Alternative replication solutions, such as Postgres Pro Multimaster, may offer better performance in certain scenarios.
  • Improving logical replication performance can be achieved by optimizing CPU usage, reducing contention, and improving scheduling.
  • Additional work is needed to further optimize logical replication performance and address common issues.