Re: Confused about stream replication protocol documentation

From: Li Japin <japinli(at)hotmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Confused about stream replication protocol documentation
Date: 2020-12-24 02:28:53
Message-ID: E3008770-67FD-44E5-A348-D0E7C3674225@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Dec 23, 2020, at 8:11 PM, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com<mailto:masao(dot)fujii(at)oss(dot)nttdata(dot)com>> wrote:

On 2020/12/23 11:08, Li Japin wrote:
On Dec 22, 2020, at 11:13 PM, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com<mailto:masao(dot)fujii(at)oss(dot)nttdata(dot)com> <mailto:masao(dot)fujii(at)oss(dot)nttdata(dot)com>> wrote:

‘B’ means a backend and ‘F’ means a frontend. Maybe as [1] does, we should
add the note like "Each is marked to indicate that it can be sent by
a frontend (F) and a backend (B)" into the description about each message
format for START_REPLICATION.

[1]
https://www.postgresql.org/docs/devel/protocol-message-formats.html <https://www.postgresql.org/docs/devel/protocol-message-formats.html>
Thanks for your clarify. Maybe we should move the "protocol message formats”
before “stream replication protocol” or referenced it in "stream replication protocol”.

I like the latter. And maybe it's better to reference to also
"53.6. Message Data Types" there because the messages for
START_REPLICATION use the message data types.

Add reference about “protocol message types” and “protocol message formats”.

index 4899bacda7..5793936b42 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -2069,8 +2069,9 @@ The commands accepted in replication mode are:
</para>

<para>
- WAL data is sent as a series of CopyData messages. (This allows
- other information to be intermixed; in particular the server can send
+ WAL data is sent as a series of CopyData messages
+ (See <xref linkend="protocol-message-types"/> and <xref linkend="protocol-message-formats"/>).
+ (This allows other information to be intermixed; in particular the server can send
an ErrorResponse message if it encounters a failure after beginning
to stream.) The payload of each CopyData message from server to the
client contains a message of one of the following formats:

--
Best regards
Japin Li

Attachment Content-Type Size
stream-replication-protocol-documentation.patch application/octet-stream 900 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2020-12-24 02:58:36 Re: [PATCH] Logical decoding of TRUNCATE
Previous Message Michael Paquier 2020-12-24 02:18:33 Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly