From b5d64a1e32884e618b06fc9bf051947fe1cd21df Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Thu, 4 May 2023 14:41:15 +0300 Subject: [PATCH] Rename field, to match field name in XLogData struct and in rust-postgres (#4149) The field means the same thing as the `wal_end` field in the XLogData struct. And in the postgres-protocol crate's corresponding PrimaryKeepAlive struct, it's also called `wal_end`. Let's be consistent. As noted by Arthur at https://github.com/neondatabase/neon/pull/4144#pullrequestreview-1411031881 --- libs/pq_proto/src/lib.rs | 4 ++-- safekeeper/src/send_wal.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/pq_proto/src/lib.rs b/libs/pq_proto/src/lib.rs index 2143ad2530..8e361b757c 100644 --- a/libs/pq_proto/src/lib.rs +++ b/libs/pq_proto/src/lib.rs @@ -613,7 +613,7 @@ pub struct XLogDataBody<'a> { #[derive(Debug)] pub struct WalSndKeepAlive { - pub sent_ptr: u64, + pub wal_end: u64, // current end of WAL on the server pub timestamp: i64, pub request_reply: bool, } @@ -924,7 +924,7 @@ impl<'a> BeMessage<'a> { buf.put_u8(b'd'); write_body(buf, |buf| { buf.put_u8(b'k'); - buf.put_u64(req.sent_ptr); + buf.put_u64(req.wal_end); buf.put_i64(req.timestamp); buf.put_u8(u8::from(req.request_reply)); }); diff --git a/safekeeper/src/send_wal.rs b/safekeeper/src/send_wal.rs index f502500e7d..fb420cba64 100644 --- a/safekeeper/src/send_wal.rs +++ b/safekeeper/src/send_wal.rs @@ -573,7 +573,7 @@ impl WalSender<'_, IO> { self.pgb .write_message(&BeMessage::KeepAlive(WalSndKeepAlive { - sent_ptr: self.end_pos.0, + wal_end: self.end_pos.0, timestamp: get_current_timestamp(), request_reply: true, }))