]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix tracing of BackendKeyData and CancelRequest
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 3 Jul 2026 11:57:35 +0000 (14:57 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 3 Jul 2026 12:00:00 +0000 (15:00 +0300)
commitdd5eca055d484af41eb6d50d6eeea7cb065d450c
tree77665ecc23585a040bf47dc47662e371a6c064d1
parent598af79b1b5e1b62c5409a8e6f7b3126848d17c8
Fix tracing of BackendKeyData and CancelRequest

BackendKeyData length was increased from 4 bytes to a variable-length
length (up to 256 bytes) in a460251f0a. However, pqTrace still traces
it as a 4 bytes key, leading to a "mismatched message length" warning
message. The same issue impacts the tracing of CancelRequest.

This patch fixes the issue by using pqTraceOutputNchar instead of
pqTraceOutputInt32 in both cases.

Author: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
Discussion: https://www.postgresql.org/message-id/CAO6_Xqo6gTv9=76H=k2qDRFU+KHuBiY2S=bQynEr6J8gS7L6xA@mail.gmail.com
Backpatch-through: 18
src/interfaces/libpq/fe-trace.c