Pass correct count to WALRead().
authorJeff Davis <[email protected]>
Fri, 16 Feb 2024 19:09:11 +0000 (11:09 -0800)
committerJeff Davis <[email protected]>
Fri, 16 Feb 2024 19:09:11 +0000 (11:09 -0800)
commit73f0a1326608ac3a7d390706fdeec59fe4dc42c0
tree458ae7eefbdeb90798ee8389d1331b141df0fd9b
parent9ecbf54075a91ed155cc779fcc1870de0fff5fef
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
src/backend/access/transam/xlogutils.c
src/backend/postmaster/walsummarizer.c
src/backend/replication/walsender.c