diff options
Diffstat (limited to 'src/backend/access')
-rw-r--r-- | src/backend/access/hash/hash_xlog.c | 8 | ||||
-rw-r--r-- | src/backend/access/hash/hashovfl.c | 2 | ||||
-rw-r--r-- | src/backend/access/hash/hashutil.c | 4 |
3 files changed, 8 insertions, 6 deletions
diff --git a/src/backend/access/hash/hash_xlog.c b/src/backend/access/hash/hash_xlog.c index 2ccaf469e78..d1c0e6904fc 100644 --- a/src/backend/access/hash/hash_xlog.c +++ b/src/backend/access/hash/hash_xlog.c @@ -1234,6 +1234,7 @@ hash_mask(char *pagedata, BlockNumber blkno) { Page page = (Page) pagedata; HashPageOpaque opaque; + int pagetype; mask_page_lsn(page); @@ -1242,15 +1243,16 @@ hash_mask(char *pagedata, BlockNumber blkno) opaque = (HashPageOpaque) PageGetSpecialPointer(page); - if (opaque->hasho_flag & LH_UNUSED_PAGE) + pagetype = opaque->hasho_flag & LH_PAGE_TYPE; + if (pagetype == LH_UNUSED_PAGE) { /* * Mask everything on a UNUSED page. */ mask_page_content(page); } - else if ((opaque->hasho_flag & LH_BUCKET_PAGE) || - (opaque->hasho_flag & LH_OVERFLOW_PAGE)) + else if (pagetype == LH_BUCKET_PAGE || + pagetype == LH_OVERFLOW_PAGE) { /* * In hash bucket and overflow pages, it is possible to modify the diff --git a/src/backend/access/hash/hashovfl.c b/src/backend/access/hash/hashovfl.c index d5f50230683..b5133e3945c 100644 --- a/src/backend/access/hash/hashovfl.c +++ b/src/backend/access/hash/hashovfl.c @@ -168,7 +168,7 @@ _hash_addovflpage(Relation rel, Buffer metabuf, Buffer buf, bool retain_pin) if (retain_pin) { /* pin will be retained only for the primary bucket page */ - Assert(pageopaque->hasho_flag & LH_BUCKET_PAGE); + Assert((pageopaque->hasho_flag & LH_PAGE_TYPE) == LH_BUCKET_PAGE); LockBuffer(buf, BUFFER_LOCK_UNLOCK); } else diff --git a/src/backend/access/hash/hashutil.c b/src/backend/access/hash/hashutil.c index 037582bd792..9f832f2544f 100644 --- a/src/backend/access/hash/hashutil.c +++ b/src/backend/access/hash/hashutil.c @@ -218,8 +218,8 @@ _hash_get_totalbuckets(uint32 splitpoint_phase) /* * _hash_checkpage -- sanity checks on the format of all hash pages * - * If flags is not zero, it is a bitwise OR of the acceptable values of - * hasho_flag. + * If flags is not zero, it is a bitwise OR of the acceptable page types + * (values of hasho_flag & LH_PAGE_TYPE). */ void _hash_checkpage(Relation rel, Buffer buf, int flags) |