File tree Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 55 * in a page which can be different when the WAL is generated
66 * and when the WAL is applied.
77 *
8- * Portions Copyright (c) 2016, PostgreSQL Global Development Group
8+ * Portions Copyright (c) 2016-2017 , PostgreSQL Global Development Group
99 *
1010 * Contains common routines required for masking a page.
1111 *
Original file line number Diff line number Diff line change @@ -9167,7 +9167,6 @@ heap_mask(char *pagedata, BlockNumber blkno)
91679167
91689168 if (ItemIdIsNormal (iid ))
91699169 {
9170-
91719170 HeapTupleHeader page_htup = (HeapTupleHeader ) page_item ;
91729171
91739172 /*
Original file line number Diff line number Diff line change @@ -1360,6 +1360,16 @@ checkXLogConsistency(XLogReaderState *record)
13601360
13611361 Assert (XLogRecHasBlockImage (record , block_id ));
13621362
1363+ if (XLogRecBlockImageApply (record , block_id ))
1364+ {
1365+ /*
1366+ * WAL record has already applied the page, so bypass the
1367+ * consistency check as that would result in comparing the full
1368+ * page stored in the record with itself.
1369+ */
1370+ continue ;
1371+ }
1372+
13631373 /*
13641374 * Read the contents from the current buffer and store it in a
13651375 * temporary page.
@@ -1390,7 +1400,7 @@ checkXLogConsistency(XLogReaderState *record)
13901400
13911401 /*
13921402 * Read the contents from the backup copy, stored in WAL record and
1393- * store it in a temporary page. There is not need to allocate a new
1403+ * store it in a temporary page. There is no need to allocate a new
13941404 * page here, a local buffer is fine to hold its contents and a mask
13951405 * can be directly applied on it.
13961406 */
Original file line number Diff line number Diff line change 77 * individual rmgr, but we make things easier by providing some
88 * common routines to handle cases which occur in multiple rmgrs.
99 *
10- * Portions Copyright (c) 2016, PostgreSQL Global Development Group
10+ * Portions Copyright (c) 2016-2017 , PostgreSQL Global Development Group
1111 *
1212 * src/include/access/bufmask.h
1313 *
You can’t perform that action at this time.
0 commit comments