diff options
Diffstat (limited to 'src/backend/storage/page/bufpage.c')
-rw-r--r-- | src/backend/storage/page/bufpage.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/storage/page/bufpage.c b/src/backend/storage/page/bufpage.c index 0afeab5140c..82457bacc62 100644 --- a/src/backend/storage/page/bufpage.c +++ b/src/backend/storage/page/bufpage.c @@ -78,8 +78,8 @@ PageInit(Page page, Size pageSize, Size specialSize) * treat such a page as empty and without free space. Eventually, VACUUM * will clean up such a page and make it usable. * - * If flag PIV_LOG_WARNING is set, a WARNING is logged in the event of - * a checksum failure. + * If flag PIV_LOG_WARNING/PIV_LOG_LOG is set, a WARNING/LOG message is logged + * in the event of a checksum failure. * * If flag PIV_IGNORE_CHECKSUM_FAILURE is set, checksum failures will cause a * message about the failure to be emitted, but will not cause @@ -143,13 +143,13 @@ PageIsVerified(PageData *page, BlockNumber blkno, int flags, bool *checksum_fail return true; /* - * Throw a WARNING if the checksum fails, but only after we've checked for - * the all-zeroes case. + * Throw a WARNING/LOG, as instructed by PIV_LOG_*, if the checksum fails, + * but only after we've checked for the all-zeroes case. */ if (checksum_failure) { - if ((flags & PIV_LOG_WARNING) != 0) - ereport(WARNING, + if ((flags & (PIV_LOG_WARNING | PIV_LOG_LOG)) != 0) + ereport(flags & PIV_LOG_WARNING ? WARNING : LOG, (errcode(ERRCODE_DATA_CORRUPTED), errmsg("page verification failed, calculated checksum %u but expected %u", checksum, p->pd_checksum))); |