def on_promote(self) -> None:
        """Entry point from HA cycle used when a standby node is to be promoted to primary.

        .. note::
            If logical replication slot synchronisation is enabled then slot advancement will be triggered.
            If any logical slots that were copied are yet to be confirmed as ready a warning message will be logged.

        """
        if self._advance:
            self._advance.clean()

        if self._logical_slots_processing_queue:
            logger.warning('Logical replication slots that might be unsafe to use after promote: %s',
                           set(self._logical_slots_processing_queue))
Entry point from HA cycle used when a standby node is to be promoted to primary.

        .. note::
            If logical replication slot synchronisation is enabled then slot advancement will be triggered.
            If any logical slots that were copied are yet to be confirmed as ready a warning message will be logged.

        
patroni/postgresql/slots.py