Here is a review comment for the latest v62-0002 changes.
======
src/backend/replication/logical/slotsync.c
1.
+ if (namestrcmp(&slot->data.plugin, remote_slot->plugin) == 0 &&
+ slot->data.database == dbid &&
+ remote_slot->restart_lsn == slot->data.restart_lsn &&
+ remote_slot->catalog_xmin == slot->data.catalog_xmin &&
+ remote_slot->two_phase == slot->data.two_phase &&
+ remote_slot->failover == slot->data.failover &&
+ remote_slot->confirmed_lsn == slot->data.confirmed_flush)
+ return false;
For consistency, I think it would be better to always code the remote
slot value on the LHS and the local slot value on the RHS, instead of
the current random mix.
And rename 'dbid' to 'remote_dbid' for name consistency too.
SUGGESTION
if (namestrcmp(remote_slot->plugin, &slot->data.plugin) == 0 &&
remote_dbid == slot->data.database &&
remote_slot->restart_lsn == slot->data.restart_lsn &&
remote_slot->catalog_xmin == slot->data.catalog_xmin &&
remote_slot->two_phase == slot->data.two_phase &&
remote_slot->failover == slot->data.failover &&
remote_slot->confirmed_lsn == slot->data.confirmed_flush)
return false;
======
Kind Regards,
Peter Smith.
Fujitsu Australia