Re: Division in dynahash.c due to HASH_FFACTOR
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: David Rowley <dgrowleyml@gmail.com>,
Jakub Wartak <Jakub.Wartak@tomtom.com>,
Alvaro Herrera <alvherre@2ndquadrant.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-09-19T01:30:56Z
Lists: pgsql-hackers
I wrote:
> ISTM that getting rid of the division obviates the concern that the
> nentries condition is too expensive,
Also, we could make it slightly cheaper yet, by changing the condition
to
hctl->freeList[0].nentries > (long) (hctl->max_bucket)
ie drop the +1. I'd argue that this is actually a more faithful
rendition of the previous condition, since what we had before was
basically
hctl->freeList[0].nentries >= (long) (hctl->max_bucket + 1)
regards, tom lane
Commits
-
Code review for dynahash change.
- ff28809feb44 14.0 landed
-
Remove large fill factor support from dynahash.c.
- be0a6666656e 14.0 landed