Unconference - Stream 3 - 13:15-14:15 - PGCon 2022

Improve PostgreSQL's logical replication with advanced filtering, synchronous commit settings, and remote apply feedback for enhanced performance and consistency.

Key takeaways
  • The current feedback mechanism in PostgreSQL’s logical replication can be weak and doesn’t provide immediate feedback, leading to inconsistent database states.
  • Introducing an option to filter out transactions from specific origins can improve logical replication performance and latency.
  • The concept of “standby” can be confusing, even in the documentation, and using a more precise term like “physical standby” or “logical standby” can help clarify the concept.
  • There are different synchronous commit settings in PostgreSQL, and setting local as the default can cause issues with performance.
  • Using remote apply in PostgreSQL can provide query consistency, but it requires careful configuration and monitoring.
  • The origin ID is used to identify the replication origin, and it’s possible to filter out transactions from specific origins based on this ID.
  • The feature for remote replay feedback in PostgreSQL’s logical replication is not well-documented and can be improved for better performance and consistency.
  • The synchronous commit setting in the subscriber can be adjusted to improve performance, but it requires careful configuration and monitoring.
  • The default value for synchronous commit is off, but setting it to local can cause issues with performance.
  • The replication protocol in PostgreSQL’s logical replication is based on a feedback mechanism, which can be improved for better performance and consistency.