def load_replication_slots(self) -> None:
        """Query replication slot information from the database and store it for processing by other tasks.

        .. note::
            Only supported from PostgreSQL version 9.4 onwards.

        Store replication slot ``name``, ``type``, ``plugin``, ``database`` and ``datoid``.
        If PostgreSQL version is 10 or newer also store ``catalog_xmin`` and ``confirmed_flush_lsn``.

        When using logical slots, store information separately for slot synchronisation  on replica nodes.
        """
        if self._postgresql.major_version >= 90400 and self._schedule_load_slots:
            replication_slots: Dict[str, Dict[str, Any]] = {}
            pg_wal_lsn_diff = f"pg_catalog.pg_{self._postgresql.wal_name}_{self._postgresql.lsn_name}_diff"
            extra = f", catalog_xmin, {pg_wal_lsn_diff}(confirmed_flush_lsn, '0/0')::bigint" \
                if self._postgresql.major_version >= 100000 else ""
            filter_columns = tuple(fltr for fltr, major in (('temporary', 100000), ('failover', 170000))
                                   if self._postgresql.major_version >= major)
            where_filter = ' AND '.join(map(lambda col: f'NOT {col}', filter_columns))
            where_condition = f' WHERE {where_filter}' if where_filter else ''
            for r in self._query("SELECT slot_name, slot_type, xmin, "
                                 f"{pg_wal_lsn_diff}(restart_lsn, '0/0')::bigint, plugin, database, datoid{extra}"
                                 f" FROM pg_catalog.pg_replication_slots{where_condition}"):
                value = {'type': r[1]}
                if r[1] == 'logical':
                    value.update(plugin=r[4], database=r[5], datoid=r[6])
                    if self._postgresql.major_version >= 100000:
                        value.update(catalog_xmin=r[7], confirmed_flush_lsn=r[8])
                else:
                    value.update(xmin=r[2], restart_lsn=r[3])
                replication_slots[r[0]] = value
            self._replication_slots = replication_slots
            self._schedule_load_slots = False
            if self._force_readiness_check:
                self._logical_slots_processing_queue = {n: None for n, v in replication_slots.items()
                                                        if v['type'] == 'logical'}
                self._force_readiness_check = False
Query replication slot information from the database and store it for processing by other tasks.

        .. note::
            Only supported from PostgreSQL version 9.4 onwards.

        Store replication slot ``name``, ``type``, ``plugin``, ``database`` and ``datoid``.
        If PostgreSQL version is 10 or newer also store ``catalog_xmin`` and ``confirmed_flush_lsn``.

        When using logical slots, store information separately for slot synchronisation  on replica nodes.
        
patroni/postgresql/slots.py