diff options
Diffstat (limited to 'contrib/pageinspect/hashfuncs.c')
-rw-r--r-- | contrib/pageinspect/hashfuncs.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/contrib/pageinspect/hashfuncs.c b/contrib/pageinspect/hashfuncs.c index ff73c363fc8..6de21d66089 100644 --- a/contrib/pageinspect/hashfuncs.c +++ b/contrib/pageinspect/hashfuncs.c @@ -66,14 +66,17 @@ verify_hash_page(bytea *raw_page, int flags) if (PageGetSpecialSize(page) != MAXALIGN(sizeof(HashPageOpaqueData))) ereport(ERROR, - (errcode(ERRCODE_INDEX_CORRUPTED), - errmsg("index table contains corrupted page"))); + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("input page is not a valid %s page", "hash"), + errdetail("Expected special size %d, got %d.", + (int) MAXALIGN(sizeof(HashPageOpaqueData)), + (int) PageGetSpecialSize(page)))); pageopaque = (HashPageOpaque) PageGetSpecialPointer(page); if (pageopaque->hasho_page_id != HASHO_PAGE_ID) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("page is not a hash page"), + errmsg("input page is not a valid %s page", "hash"), errdetail("Expected %08x, got %08x.", HASHO_PAGE_ID, pageopaque->hasho_page_id))); @@ -134,7 +137,7 @@ verify_hash_page(bytea *raw_page, int flags) ereport(ERROR, (errcode(ERRCODE_INDEX_CORRUPTED), errmsg("invalid version for metadata"), - errdetail("Expected %d, got %d", + errdetail("Expected %d, got %d.", HASH_VERSION, metap->hashm_version))); } |