We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Bertrand Drouvot Postgres 16 highlight Logical decoding on standby
Postgres 16 introduces logical decoding on standby, allowing for logical replication slot creation and synchronization on a standby instance, ensuring data consistency and high availability.
- Logical decoding on standby is a new feature in Postgres 16, allowing for logical replication slot creation and synchronization on a standby instance.
-
It uses a new parameter called
outstandby_feedback
to provide feedback to the primary about the standby’s activity. - There are two types of conflicts: raw removal conflicts and catalog conflicts. Raw removal conflicts occur when the primary and standby have different catalog states.
- Catalog conflicts occur when there is a catalog table on the primary, and the standby is unaware of it.
-
When creating a logical replication slot on the primary, it must be done with
hot_standby_feedback
set to ‘on’. - When creating a publication on the primary, it must be linked to the table that is being replicated.
-
Logical decoding on standby does not work if
hot_standby_feedback
is not set to ‘on’. - Automatic failover is not available in Postgres 16, but may be available in future versions.
- Conflicts can be resolved by replaying the transaction that caused the conflict and then logical decoding can occur.
- Logical decoding on standby is the foundation for slot replication between primary and standby instances.
- The physical wall sender sends the wall record to the cascading standby, and the startup process does the recovery.
- The logical decoding process on the standby can be manual or automatic, depending on the specific use case.