]> granicus.if.org Git - postgresql/commit
pageinspect: Fix hash_bitmap_info not to read the underlying page.
authorRobert Haas <rhaas@postgresql.org>
Thu, 9 Feb 2017 19:02:58 +0000 (14:02 -0500)
committerRobert Haas <rhaas@postgresql.org>
Thu, 9 Feb 2017 19:34:34 +0000 (14:34 -0500)
commitfc8219dc54c95ea673560b786aa8123ce6ec5977
treea33bf5ea881e397242775e97df4a606ecc21c717
parent86d911ec0f9d4643e9a47db42510959dec0ed76b
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.
contrib/pageinspect/expected/hash.out
contrib/pageinspect/hashfuncs.c
src/backend/access/hash/hashovfl.c