CancelRequest(F) documentation.

Started by Dmitriy Igrishin6 months ago3 messagesdocs
Jump to latest
#1Dmitriy Igrishin
dmitigr@gmail.com

Hello,

CancelRequest(F) documentation at
https://www.postgresql.org/docs/18/protocol-message-formats.html#PROTOCOL-MESSAGE-FORMATS-CANCELREQUEST
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.)

I would propose to specify the overall message length as Int32 in the
documentation for PostgreSQL 18+.

Thanks.

#2Jelte Fennema-Nio
postgres@jeltef.nl
In reply to: Dmitriy Igrishin (#1)
Re: CancelRequest(F) documentation.

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-CANCELREQUEST
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:

v1-0001-docs-Fix-protocol-version-3.2-message-format-of-C.patchtext/x-patch; charset=utf-8; name=v1-0001-docs-Fix-protocol-version-3.2-message-format-of-C.patchDownload+1-2
#3Magnus Hagander
magnus@hagander.net
In reply to: Jelte Fennema-Nio (#2)
Re: CancelRequest(F) documentation.

On Mon, 13 Oct 2025 at 11:57, Jelte Fennema-Nio <postgres@jeltef.nl> wrote:

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-CANCELREQUEST

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.

Thanks, pushed!

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/&gt;
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/&gt;