Re: comments in hash_alloc_buckets

From: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: comments in hash_alloc_buckets
Date: 2017-03-25 07:28:51
Message-ID: CAE9k0Pnu1sYRazGZaGHmMBQh7co5=cbKpRUB1tMiaDyYybpT5A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
corrected_comments_hash_alloc_buckets_v2.patch application/x-patch 547 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2017-03-25 07:54:36 Re: Patch: Write Amplification Reduction Method (WARM)
Previous Message Ashutosh Sharma 2017-03-25 07:03:42 Re: Add pgstathashindex() to get hash index table statistics.