agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix tracing of BackendKeyData and CancelRequest
Date: Fri, 03 Jul 2026 12:05:58 +0000
Message-ID: <E1wfcec-001AAc-2P@gemulon.postgresql.org> (raw)

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...
Backpatch-through: 18

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/dd5eca055d484af41eb6d50d6eeea7cb065d450c

Modified Files
--------------
src/interfaces/libpq/fe-trace.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)



view thread (3+ messages)  latest in thread

Message-ID: <E1wfcec-001AAc-2P@gemulon.postgresql.org>
Permalink:  ../E1wfcec-001AAc-2P@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wfcec-001AAc-2P@gemulon.postgresql.org

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: pgsql-committers@postgresql.org
  Cc: heikki.linnakangas@iki.fi, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix tracing of BackendKeyData and CancelRequest
  In-Reply-To: <E1wfcec-001AAc-2P@gemulon.postgresql.org>

* 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