Skip to content

Commit cff2a0d

Browse files
hlinnakaCommitfest Bot
authored and
Commitfest Bot
committed
docs: Update phrase that talks about message lengths in the protocol
The reasoning for why all the message formats are parseable without the explicit message length field is anachronistic; the real reason is that protocol version 2 did not have a message length field. There's nothing wrong with relying on the message length, like we do in the new variable-length definitions of CancelRequest and BackendKeyData., even though it often still makes sense to have length fields for individual parts in messages.
1 parent dc4957e commit cff2a0d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/src/sgml/protocol.sgml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3650,10 +3650,10 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
36503650
indicate that it can be sent by a frontend (F), a backend (B), or both
36513651
(F & B).
36523652
Notice that although each message includes a byte count at the beginning,
3653-
the message format is defined so that the message end can be found without
3654-
reference to the byte count. This aids validity checking. (The CopyData
3655-
message is an exception, because it forms part of a data stream; the contents
3656-
of any individual CopyData message cannot be interpretable on their own.)
3653+
most messages are defined so that the message end can be found without
3654+
reference to the byte count. This is mostly for historical reasons, as
3655+
the original, now-obsolete protocol version 2 did not have an explicit length
3656+
field, but it also aids validity checking.
36573657
</para>
36583658

36593659
<variablelist>

0 commit comments

Comments
 (0)