index 945f1f790d5ba70ee79b92f37e57ee8d25f5b06a..ad93035d508aa752f6c4262ee72c982629fc6a77 100644 (file)
@@ -1007,12 +1007,7 @@ read_local_xlog_page_guts(XLogReaderState *state, XLogRecPtr targetPagePtr,
count = read_upto - targetPagePtr;
}
- /*
- * Even though we just determined how much of the page can be validly read
- * as 'count', read the whole page anyway. It's guaranteed to be
- * zero-padded up to the page boundary if it's incomplete.
- */
- if (!WALRead(state, cur_page, targetPagePtr, XLOG_BLCKSZ, tli,
+ if (!WALRead(state, cur_page, targetPagePtr, count, tli,
&errinfo))
WALReadRaiseError(&errinfo);
index 3e1b146538689a6ff673b6eb7567b65a51866b74..e85d4970347b41ddb8d30a08a693412a4c64f9b6 100644 (file)
@@ -1318,12 +1318,7 @@ summarizer_read_local_xlog_page(XLogReaderState *state,
}
}
- /*
- * Even though we just determined how much of the page can be validly read
- * as 'count', read the whole page anyway. It's guaranteed to be
- * zero-padded up to the page boundary if it's incomplete.
- */
- if (!WALRead(state, cur_page, targetPagePtr, XLOG_BLCKSZ,
+ if (!WALRead(state, cur_page, targetPagePtr, count,
private_data->tli, &errinfo))
WALReadRaiseError(&errinfo);
index e5477c1de1b986f99c1ebade0ed49dd0a826da42..631d1e0c9fd49f84cfdfd94c4485c960b3bcb314 100644 (file)
@@ -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. */