diff --git a/contrib/test_decoding/expected/messages.out b/contrib/test_decoding/expected/messages.out
index f8a57981afb..dc2ceda182b 100644
--- a/contrib/test_decoding/expected/messages.out
+++ b/contrib/test_decoding/expected/messages.out
@@ -77,7 +77,8 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'for
  COMMIT
 (13 rows)
 
--- Test the reported LSN.
+-- Test the reported LSN.  pg_logical_emit_message() returns the end LSN of
+-- the message's WAL record.
 -- For transactional messages, decoding reports the start LSN,
 -- so it must be less than the returned LSN.
 SELECT pg_logical_emit_message(true, 'test', 'lsn_test') AS message_end_lsn \gset
diff --git a/contrib/test_decoding/sql/messages.sql b/contrib/test_decoding/sql/messages.sql
index cc898982b77..bbde91f016a 100644
--- a/contrib/test_decoding/sql/messages.sql
+++ b/contrib/test_decoding/sql/messages.sql
@@ -22,7 +22,8 @@ SELECT 'ignorethis' FROM pg_logical_emit_message(true, 'test', 'czechtastic');
 
 SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'force-binary', '0', 'skip-empty-xacts', '1', 'include-xids', '0');
 
--- Test the reported LSN.
+-- Test the reported LSN.  pg_logical_emit_message() returns the end LSN of
+-- the message's WAL record.
 -- For transactional messages, decoding reports the start LSN,
 -- so it must be less than the returned LSN.
 SELECT pg_logical_emit_message(true, 'test', 'lsn_test') AS message_end_lsn \gset
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index 5af2c22b6a5..d76881bd167 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -1143,9 +1143,11 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
       the XID of the transaction that emitted the message; for a
       transactional message emitted in a subtransaction, it is the
       subtransaction's XID while <parameter>txn</parameter> is the top-level
-      transaction. The <parameter>message_lsn</parameter> is the
-      start LSN of the message for transactional messages, or its end LSN for
-      non-transactional messages. The <parameter>transactional</parameter>
+      transaction. The <parameter>message_lsn</parameter> is the start of
+      the message's WAL record for a transactional message, like the LSN of
+      the other changes in the transaction. For a non-transactional message
+      it is the end of the record.
+      The <parameter>transactional</parameter>
       says if the message was sent as transactional or not. Similar to the
       change callback, in case of decoding a prepared (but yet uncommitted)
       transaction or decoding of an uncommitted transaction, this message
@@ -1379,6 +1381,8 @@ typedef void (*LogicalDecodeStreamMessageCB) (struct LogicalDecodingContext *ctx
       if it was emitted in one. For the other stream callbacks, the XID of
       the subtransaction is available as
       <literal>change-&gt;txn-&gt;xid</literal>.
+      The <parameter>message_lsn</parameter> is the start of the message's
+      WAL record, as only transactional messages are passed to this callback.
      </para>
     </sect3>
 
diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c
index 76bb4fb58be..031bb1001bd 100644
--- a/src/backend/replication/logical/decode.c
+++ b/src/backend/replication/logical/decode.c
@@ -669,15 +669,15 @@ logicalmsg_decode(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
 		snapshot = SnapBuildGetOrBuildSnapshot(builder);
 
 	/*
-	 * For transactional messages, use origptr as the mesage's LSN, like
-	 * regular DML changes.
+	 * Transactional messages use origptr as their LSN, like regular DML
+	 * changes.
 	 *
-	 * For non-transactional messages, use endptr as the message's LSN, since
-	 * we assume that each message is applied and confirmed as a unit of its
-	 * own, like a commit. Using origptr instead would leave the replication
-	 * slot's confirmed_flush pointing at the message record itself. Since
-	 * decoding resumes from the confirmed position inclusive, the message
-	 * could be decoded and sent again after a restart.
+	 * Non-transactional messages use endptr instead, since we assume that
+	 * each message is applied and confirmed as a unit of its own, like a
+	 * commit. Using origptr would leave the replication slot's
+	 * confirmed_flush pointing at the message record itself. Since decoding
+	 * resumes from the confirmed position inclusive, the message could be
+	 * decoded and sent again after a restart.
 	 */
 	ReorderBufferQueueMessage(ctx->reorder, xid, snapshot,
 							  message->transactional ? buf->origptr : buf->endptr,
