Logical Change Records, the logical WALs - Ashutosh Bapat - PGCon 2022

Discover Logical Change Records (LCRs), a technology that enhances PostgreSQL's logical replication performance. LCRs optimize data transfer and application, resulting in faster replication and backup processes.

Key takeaways
  • Logical Change Records (LCRs) are a new technology that can improve the performance of logical replication in PostgreSQL.
  • LCRs are a logical representation of the changes that are made to a database, while WAL (Write-Ahead Log) records are a physical representation of the changes.
  • LCRs are smaller and take up less space than WAL records, and they can be applied to the database more quickly.
  • LCRs can be used to improve the performance of logical replication by reducing the amount of data that needs to be sent over the network and by reducing the amount of time that it takes to apply the changes to the database.
  • LCRs can also be used to improve the performance of logical backups by reducing the amount of time that it takes to create the backup.
  • LCRs are still under development, but they have the potential to significantly improve the performance of logical replication and logical backups in PostgreSQL.
  • Wall decoder is a new process that reads the WAL stream and writes LCRs to disk.
  • Wall sender is a process that reads LCRs from disk and sends them to the downstream server.
  • Decoding worker is a process that decodes the LCRs and applies them to the database.
  • Parallel decoding can be used to improve the performance of logical replication by using multiple processes to decode the LCRs.
  • LCRs can be used to improve the performance of logical replication in systems with very high load and higher number of wall senders.
  • LCRs can also be used to improve the performance of logical backups by reducing the amount of time that it takes to create the backup.