public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jelte Fennema-Nio <[email protected]>
To: Dmitry Igrishin <[email protected]>
To: [email protected]
Subject: Re: CancelRequest(F) documentation.
Date: Mon, 13 Oct 2025 11:57:06 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAAfz9KML7JCZWZsOc2AWgoUHgmRGoOAOR6L=xDFe9F3_L1uXAQ@mail.gmail.com>
References: <CAAfz9KML7JCZWZsOc2AWgoUHgmRGoOAOR6L=xDFe9F3_L1uXAQ@mail.gmail.com>

On Tue Oct 7, 2025 at 6:08 PM CEST, Dmitry Igrishin wrote:
> CancelRequest(F) documentation at
> https://www.postgresql.org/docs/18/protocol-message-formats.html#PROTOCOL-MESSAGE-FORMATS-CANCELREQU...
> seems to be inconsistent for protocol 3.2. It is stated here that the
> length of the message is always 16 bytes (specified as Int32(16)),
> however the maximum message length actually depends on the secret key
> length (which can be up to 256 bytes, as also stated in the
> documentation.)

Good catch. Attached is a patch that fixes this.


Attachments:

  [text/x-patch] v1-0001-docs-Fix-protocol-version-3.2-message-format-of-C.patch (1.1K, 2-v1-0001-docs-Fix-protocol-version-3.2-message-format-of-C.patch)
  download | inline diff:
From 5506c574e976eb40174820668a00f02e9b4b62f4 Mon Sep 17 00:00:00 2001
From: Jelte Fennema-Nio <[email protected]>
Date: Mon, 13 Oct 2025 11:52:22 +0200
Subject: [PATCH v1] docs: Fix protocol version 3.2 message format of
 CancelRequest

Since protocol version 3.2 the CancelRequest does not have a fixed size
length anymore. The protocol docs still listed the length field to be a
constant number though. This fixes that.

Reported-by: Dmitry Igrishin <[email protected]>
Backpatch-through: 18
---
 doc/src/sgml/protocol.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index b5395604fb8..9d755232873 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -4327,7 +4327,7 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
     <listitem>
      <variablelist>
       <varlistentry>
-       <term>Int32(16)</term>
+       <term>Int32</term>
        <listitem>
         <para>
          Length of message contents in bytes, including self.

base-commit: 7a662a46ebf74e9fa15cb62b592b4bf00c96fc94
-- 
2.51.0



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: CancelRequest(F) documentation.
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox