Replication docs massaging, mostly formatting

This commit is contained in:
Daniele Varrazzo 2016-08-07 02:23:02 +01:00
parent 9a4f8f915f
commit 86434548a7
2 changed files with 13 additions and 11 deletions

View File

@ -515,6 +515,8 @@ resources about the topic.
.. index:: .. index::
single: Replication single: Replication
.. _replication-support:
Replication protocol support Replication protocol support
---------------------------- ----------------------------

View File

@ -148,10 +148,7 @@ Logging cursor
Replication connection and cursor classes Replication connection and cursor classes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. index:: See :ref:`replication-support` for an introduction to the topic.
pair: Connection; replication
.. autoclass:: ReplicationConnectionBase
The following replication types are defined: The following replication types are defined:
@ -160,6 +157,9 @@ The following replication types are defined:
.. data:: REPLICATION_PHYSICAL .. data:: REPLICATION_PHYSICAL
.. index::
pair: Connection; replication
.. autoclass:: LogicalReplicationConnection .. autoclass:: LogicalReplicationConnection
This connection factory class can be used to open a special type of This connection factory class can be used to open a special type of
@ -200,8 +200,8 @@ The individual messages in the replication stream are represented by
The actual data received from the server. The actual data received from the server.
An instance of either `bytes()` or `unicode()`, depending on the value An instance of either `bytes()` or `unicode()`, depending on the value
of `decode` option passed to `ReplicationCursor.start_replication()` of `decode` option passed to `~ReplicationCursor.start_replication()`
on the connection. See `ReplicationCursor.read_message()` for on the connection. See `~ReplicationCursor.read_message()` for
details. details.
.. attribute:: data_size .. attribute:: data_size
@ -353,7 +353,7 @@ The individual messages in the replication stream are represented by
.. method:: consume_stream(consume, keepalive_interval=10) .. method:: consume_stream(consume, keepalive_interval=10)
:param consume: a callable object with signature ``consume(msg)`` :param consume: a callable object with signature :samp:`consume({msg})`
:param keepalive_interval: interval (in seconds) to send keepalive :param keepalive_interval: interval (in seconds) to send keepalive
messages to the server messages to the server
@ -451,11 +451,11 @@ The individual messages in the replication stream are represented by
(after calling `start_replication()` once). For synchronous (after calling `start_replication()` once). For synchronous
connections see `consume_stream()`. connections see `consume_stream()`.
The returned message's `ReplicationMessage.payload` is an instance of The returned message's `~ReplicationMessage.payload` is an instance of
`unicode()` decoded according to connection `connection.encoding` `!unicode` decoded according to connection `~connection.encoding`
*iff* `decode` was set to `!True` in the initial call to *iff* *decode* was set to `!True` in the initial call to
`start_replication()` on this connection, otherwise it is an instance `start_replication()` on this connection, otherwise it is an instance
of `bytes()` with no decoding. of `!bytes` with no decoding.
It is expected that the calling code will call this method repeatedly It is expected that the calling code will call this method repeatedly
in order to consume all of the messages that might have been buffered in order to consume all of the messages that might have been buffered