On Tue, Mar 21, 2017 at 10:15 AM, Ashutosh Sharma <ashu.coe...@gmail.com> wrote:
>> I think it is not just happening for freed overflow but also for newly
>> allocated bucket page. It would be good if we could mark freed
>> overflow page as UNUSED page rather than just initialising it's header
>> portion and leaving the page type in special area as it is. Attached
>> is the patch '0001-mark_freed_ovflpage_as_UNUSED_pagetype.patch' that
>> marks a freed overflow page as an unused page.
>> Also, I have now changed pageinspect module to handle unused and empty
>> hash index page. Attached is the patch
>> (0002-allow_pageinspect_handle_UNUSED_OR_EMPTY_hash_pages.patch) for
>> the same.
>>  -
I have yet to review your patches, let's first try to clear other
things before doing so.
> I think when expanding hash index table we are only initialising the
> pages that will be in-use after split or the last block in the index.
> The initial few pages where tuples will be moved from old to new pages
> has no issues but the last block that is just initialised and is not
> marked as hash page needs to be handled along with the freed overflow
I think PageIsEmpty() check in hashfuncs.c is sufficient for same. I
don't see any value in treating the last page allocated during
_hash_alloc_buckets() any different from other pages which are prior
to that but will get allocated when required.
Sent via pgsql-hackers mailing list (firstname.lastname@example.org)
To make changes to your subscription: