summaryrefslogtreecommitdiff
path: root/src/backend/replication
diff options
context:
space:
mode:
authorJeff Davis2024-02-16 19:09:11 +0000
committerJeff Davis2024-02-16 19:09:11 +0000
commit73f0a1326608ac3a7d390706fdeec59fe4dc42c0 (patch)
tree458ae7eefbdeb90798ee8389d1331b141df0fd9b /src/backend/replication
parent9ecbf54075a91ed155cc779fcc1870de0fff5fef (diff)
Pass correct count to WALRead().
Previously, some callers requested XLOG_BLCKSZ bytes unconditionally. While this did not cause a problem, because the extra bytes are ignored, it's confusing and makes it harder to add safety checks. Additionally, the comment about zero padding was incorrect. With this commit, all callers request the number of bytes they actually need. Author: Bharath Rupireddy Reviewed-by: Kyotaro Horiguchi Discussion: https://postgr.es/m/CALj2ACWBRFac2TingD3PE3w2EBHXUHY3=AEEZPJmqhpEOBGExg@mail.gmail.com
Diffstat (limited to 'src/backend/replication')
-rw-r--r--src/backend/replication/walsender.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index e5477c1de1b..631d1e0c9fd 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -1099,7 +1099,7 @@ logical_read_xlog_page(XLogReaderState *state, XLogRecPtr targetPagePtr, int req
if (!WALRead(state,
cur_page,
targetPagePtr,
- XLOG_BLCKSZ,
+ count,
currTLI, /* Pass the current TLI because only
* WalSndSegmentOpen controls whether new TLI
* is needed. */