diff options
author | Robert Haas <rhaas@postgresql.org> | 2017-02-14 12:41:01 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2017-02-14 12:41:01 -0500 |
commit | fb47544d0ca18312bf0b9e53e335217db5c41a08 (patch) | |
tree | 6b7919d31a7d13069f919d467c639da81c71b259 /src/backend/access/transam/xlog.c | |
parent | e28b1156122f4d48d6f6f7a7f26381ee7af65a91 (diff) | |
download | postgresql-fb47544d0ca18312bf0b9e53e335217db5c41a08.tar.gz postgresql-fb47544d0ca18312bf0b9e53e335217db5c41a08.zip |
Minor fixes for WAL consistency checking.
Michael Paquier, reviewed and slightly revised by me.
Discussion: http://postgr.es/m/CAB7nPqRzCQb=vdfHvMtP0HMLBHU6z1aGdo4GJsUP-HP8jx+Pkw@mail.gmail.com
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 2dcff7f54b5..f23e1086280 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -1360,6 +1360,16 @@ checkXLogConsistency(XLogReaderState *record) Assert(XLogRecHasBlockImage(record, block_id)); + if (XLogRecBlockImageApply(record, block_id)) + { + /* + * WAL record has already applied the page, so bypass the + * consistency check as that would result in comparing the full + * page stored in the record with itself. + */ + continue; + } + /* * Read the contents from the current buffer and store it in a * temporary page. @@ -1390,7 +1400,7 @@ checkXLogConsistency(XLogReaderState *record) /* * Read the contents from the backup copy, stored in WAL record and - * store it in a temporary page. There is not need to allocate a new + * store it in a temporary page. There is no need to allocate a new * page here, a local buffer is fine to hold its contents and a mask * can be directly applied on it. */ |