Re: comments in hash_alloc_buckets - Mailing list pgsql-hackers

From Ashutosh Sharma
Subject Re: comments in hash_alloc_buckets
Date
Msg-id CAE9k0Pnu1sYRazGZaGHmMBQh7co5=cbKpRUB1tMiaDyYybpT5A@mail.gmail.com
Whole thread Raw
In response to Re: comments in hash_alloc_buckets  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
>> While working on - [1], I realised that the following comments in
>> _hash_alloc_buckets() needs to be corrected.
>>
>>     /*
>>      * Initialize the freed overflow page.  Just zeroing the page won't work,
>>      * See _hash_freeovflpage for similar usage.
>>      */
>>     _hash_pageinit(page, BLCKSZ);
>>
>> Attached is the patch that corrects above comment. Thanks.
>>
>
> - * Initialize the freed overflow page.  Just zeroing the page won't work,
> + * Initialize the last page in hash index.
>
> I think saying ".. last page in hash index" sounds slightly awkward as
> this is the last page for current split point, how about just
> "Initialize the page. ..."

Yes, I mean just adding "Initialize the page. ..." looks more simple
and correct. Attached is the patch with similar comment.

Attachment

pgsql-hackers by date:

Previous
From: Ashutosh Sharma
Date:
Subject: Re: Add pgstathashindex() to get hash index table statistics.
Next
From: Amit Kapila
Date:
Subject: Re: Patch: Write Amplification Reduction Method (WARM)