def sync_slots_in_database(self, database: str, slots: List[str]) -> None:
        """Synchronise slots for a single database.

        :param database: name of the database.
        :param slots: list of slot names to synchronise.
        """
        with self._slots_handler.get_local_connection_cursor(dbname=database, options='-c statement_timeout=0') as cur:
            for slot in slots:
                with self._condition:
                    lsn = self._scheduled.get(database, {}).get(slot, 0)
                if lsn:
                    self.sync_slot(cur, database, slot, lsn)
Synchronise slots for a single database.

        :param database: name of the database.
        :param slots: list of slot names to synchronise.
        
patroni/postgresql/slots.py