diff options
| author | Robert Haas | 2017-02-09 19:02:58 +0000 |
|---|---|---|
| committer | Robert Haas | 2017-02-09 19:34:34 +0000 |
| commit | fc8219dc54c95ea673560b786aa8123ce6ec5977 (patch) | |
| tree | a33bf5ea881e397242775e97df4a606ecc21c717 /contrib/pageinspect/expected | |
| parent | 86d911ec0f9d4643e9a47db42510959dec0ed76b (diff) | |
pageinspect: Fix hash_bitmap_info not to read the underlying page.
It did that to verify that the page was an overflow page rather than
anything else, but that means that checking the status of all the
overflow bits requires reading the entire index. So don't do that.
The new code validates that the page is not a primary bucket page
or bitmap page by looking at the metapage, so that using this on
large numbers of pages can be reasonably efficient.
Ashutosh Sharma, per a complaint from me, and with further
modifications by me.
Diffstat (limited to 'contrib/pageinspect/expected')
| -rw-r--r-- | contrib/pageinspect/expected/hash.out | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/contrib/pageinspect/expected/hash.out b/contrib/pageinspect/expected/hash.out index 7eb1537b29..8ed60bccc0 100644 --- a/contrib/pageinspect/expected/hash.out +++ b/contrib/pageinspect/expected/hash.out @@ -30,23 +30,17 @@ hash_page_type | bitmap SELECT hash_page_type(get_raw_page('test_hash_a_idx', 6)); ERROR: block number 6 is out of range for relation "test_hash_a_idx" SELECT * FROM hash_bitmap_info('test_hash_a_idx', 0); -ERROR: page is not an overflow page -DETAIL: Expected 00000001, got 00000008. +ERROR: invalid overflow block number 0 SELECT * FROM hash_bitmap_info('test_hash_a_idx', 1); -ERROR: page is not an overflow page -DETAIL: Expected 00000001, got 00000002. +ERROR: invalid overflow block number 1 SELECT * FROM hash_bitmap_info('test_hash_a_idx', 2); -ERROR: page is not an overflow page -DETAIL: Expected 00000001, got 00000002. +ERROR: invalid overflow block number 2 SELECT * FROM hash_bitmap_info('test_hash_a_idx', 3); -ERROR: page is not an overflow page -DETAIL: Expected 00000001, got 00000002. +ERROR: invalid overflow block number 3 SELECT * FROM hash_bitmap_info('test_hash_a_idx', 4); -ERROR: page is not an overflow page -DETAIL: Expected 00000001, got 00000002. +ERROR: invalid overflow block number 4 SELECT * FROM hash_bitmap_info('test_hash_a_idx', 5); -ERROR: page is not an overflow page -DETAIL: Expected 00000001, got 00000004. +ERROR: invalid overflow block number 5 SELECT magic, version, ntuples, bsize, bmsize, bmshift, maxbucket, highmask, lowmask, ovflpoint, firstfree, nmaps, procid, spares, mapp FROM hash_metapage_info(get_raw_page('test_hash_a_idx', 0)); |
