Re: Change GUC hashtable to use simplehash?

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: John Naylor <johncnaylorls(at)gmail(dot)com>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Junwang Zhao <zhjwpku(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gurjeet Singh <gurjeet(at)singh(dot)im>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Change GUC hashtable to use simplehash?
Date: 2024-01-21 01:06:36
Message-ID: 48e8f8bbe0be9c789f98776c7438244ab7a7cc63.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 2024-01-20 at 13:48 +0700, John Naylor wrote:
> The above identity is not true for this haszero64 macro.

I see.

> I hope this makes it more clear. Maybe the comment could use some
> work.

Yes, thank you. I don't think we need to change the algorithm.

After having stepped away from this work for a couple weeks and
returning to it, I think the comments and/or naming could be more
clear. We first use the result of haszero64() as a boolean to break out
of the loop, but then later use it in a more interesting way to count
the number of remaining bytes.

Perhaps you can take the comment out of the loop and just describe the
algorithm we're using, and make a note that we have to byteswap first.
"Indeterminate" could be explained briefly as well.

These are minor comments.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2024-01-21 02:02:07 Re: PATCH: Using BRIN indexes for sorted output
Previous Message James Coleman 2024-01-21 00:12:11 Re: PG12 change to DO UPDATE SET column references