diff options
author | Magnus Hagander <magnus@hagander.net> | 2018-04-09 19:02:42 +0200 |
---|---|---|
committer | Magnus Hagander <magnus@hagander.net> | 2018-04-09 19:03:42 +0200 |
commit | a228cc13aeabff308d6dfc98a1015865f5393fce (patch) | |
tree | 4704837fb075ccf7c8e5ecc10f341e527ed0e16d /src/backend/storage/page/bufpage.c | |
parent | 03c11796a95cc20a4559a103019d4d22a116a13c (diff) |
Revert "Allow on-line enabling and disabling of data checksums"
This reverts the backend sides of commit 1fde38beaa0c3e66c340efc7cc0dc272d6254bb0.
I have, at least for now, left the pg_verify_checksums tool in place, as
this tool can be very valuable without the rest of the patch as well,
and since it's a read-only tool that only runs when the cluster is down
it should be a lot safer.
Diffstat (limited to 'src/backend/storage/page/bufpage.c')
-rw-r--r-- | src/backend/storage/page/bufpage.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/storage/page/bufpage.c b/src/backend/storage/page/bufpage.c index 790e4b860ad..dfbda5458fd 100644 --- a/src/backend/storage/page/bufpage.c +++ b/src/backend/storage/page/bufpage.c @@ -93,7 +93,7 @@ PageIsVerified(Page page, BlockNumber blkno) */ if (!PageIsNew(page)) { - if (DataChecksumsNeedVerify()) + if (DataChecksumsEnabled()) { checksum = pg_checksum_page((char *) page, blkno); @@ -1168,7 +1168,7 @@ PageSetChecksumCopy(Page page, BlockNumber blkno) static char *pageCopy = NULL; /* If we don't need a checksum, just return the passed-in data */ - if (PageIsNew(page) || !DataChecksumsNeedWrite()) + if (PageIsNew(page) || !DataChecksumsEnabled()) return (char *) page; /* @@ -1195,7 +1195,7 @@ void PageSetChecksumInplace(Page page, BlockNumber blkno) { /* If we don't need a checksum, just return */ - if (PageIsNew(page) || !DataChecksumsNeedWrite()) + if (PageIsNew(page) || !DataChecksumsEnabled()) return; ((PageHeader) page)->pd_checksum = pg_checksum_page((char *) page, blkno); |