From 27eb5e6a19d52f9940069db6b0f1fdf137ba3ad8 Mon Sep 17 00:00:00 2001 From: Vlad Lazar Date: Mon, 18 Nov 2024 11:26:07 +0100 Subject: [PATCH] review: add COPY_DATA_TAG mention --- libs/pq_proto/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/pq_proto/src/lib.rs b/libs/pq_proto/src/lib.rs index 20b9ea18b1..53045060c9 100644 --- a/libs/pq_proto/src/lib.rs +++ b/libs/pq_proto/src/lib.rs @@ -1013,7 +1013,9 @@ impl BeMessage<'_> { } BeMessage::InterpretedWalRecords(rec) => { - buf.put_u8(b'd'); // arbitrary byte + // We use the COPY_DATA_TAG for our custom message + // since this tag is interpreted as raw bytes. + buf.put_u8(b'd'); write_body(buf, |buf| { buf.put_u8(b'0'); // matches INTERPRETED_WAL_RECORD_TAG in postgres-protocol // dependency