aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/hash/hashpage.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/hash/hashpage.c')
-rw-r--r--src/backend/access/hash/hashpage.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/backend/access/hash/hashpage.c b/src/backend/access/hash/hashpage.c
index 3cd4daa3250..bf1ffff4e8c 100644
--- a/src/backend/access/hash/hashpage.c
+++ b/src/backend/access/hash/hashpage.c
@@ -1564,16 +1564,12 @@ _hash_getbucketbuf_from_hashkey(Relation rel, uint32 hashkey, int access,
page = BufferGetPage(buf);
opaque = (HashPageOpaque) PageGetSpecialPointer(page);
Assert(opaque->hasho_bucket == bucket);
+ Assert(opaque->hasho_prevblkno != InvalidBlockNumber);
/*
* If this bucket hasn't been split, we're done.
- *
- * NB: The check for InvalidBlockNumber is only needed for on-disk
- * compatibility with indexes created before we started storing
- * hashm_maxbucket in the primary page's hasho_prevblkno.
*/
- if (opaque->hasho_prevblkno == InvalidBlockNumber ||
- opaque->hasho_prevblkno <= metap->hashm_maxbucket)
+ if (opaque->hasho_prevblkno <= metap->hashm_maxbucket)
break;
/* Drop lock on this buffer, update cached metapage, and retry. */