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 <[email protected]>
Discussion: 
https://www.postgresql.org/message-id/CAO6_Xqo6gTv9=76H=k2qDRFU+KHuBiY2S=bqyner6j8gs7l...@mail.gmail.com
Backpatch-through: 18

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0766bc57e9f94e5321e6ea4cb49db430224b2e60

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

Reply via email to