Hi, I took another high-level look at all the funtion names of the slotsync.c file.
====== src/backend/replication/logical/slotsync.c +static bool +local_slot_update(RemoteSlot * remote_slot, Oid remote_dbid) +static List * +get_local_synced_slots(void) +static bool +check_sync_slot_on_remote(ReplicationSlot *local_slot, List *remote_slots, +static void +drop_obsolete_slots(List *remote_slot_list) +static void +reserve_wal_for_slot(XLogRecPtr restart_lsn) +static bool +update_and_persist_slot(RemoteSlot * remote_slot, Oid remote_dbid) +static bool +synchronize_one_slot(RemoteSlot * remote_slot, Oid remote_dbid) +get_slot_invalidation_cause(char *conflict_reason) +static bool +synchronize_slots(WalReceiverConn *wrconn) +static void +validate_primary_slot(WalReceiverConn *wrconn, int slot_invalid_elevel) +static bool +validate_slotsync_params(int elevel) +bool +IsSyncingReplicationSlots(void) +Datum +pg_sync_replication_slots(PG_FUNCTION_ARGS) ~~~ There seems some muddling of names here: - "local" versus ? and "remote" versus "primary"; or sometimes the function does not give an indication. - "sync_slot" versus "synced_slot" versus nothing - "check" versus "validate" - etc. Below are some suggestions (some are unchanged); probably there are better ideas for names but my point is that the current names could be improved: CURRENT SUGGESTION get_local_synced_slots get_local_synced_slots check_sync_slot_on_remote check_local_synced_slot_exists_on_remote drop_obsolete_slots drop_local_synced_slots reserve_wal_for_slot reserve_wal_for_local_slot local_slot_update update_local_synced_slot update_and_persist_slot update_and_persist_local_synced_slot get_slot_invalidation_cause get_slot_conflict_reason synchronize_slots synchronize_remote_slots_to_local synchronize_one_slot synchronize_remote_slot_to_local validate_primary_slot check_remote_synced_slot_exists validate_slotsync_params check_local_config IsSyncingReplicationSlots IsSyncingReplicationSlots pg_sync_replication_slots pg_sync_replication_slots ====== Kind Regards, Peter Smith. Fujitsu Australia