Re: a code question - Mailing list pgsql-bugs

From David Rowley
Subject Re: a code question
Date
Msg-id CAApHDvoebxs+wA4-XtDY2JiUT7bxPE8+xZ2DDW7SmwOti2rqrw@mail.gmail.com
Whole thread Raw
In response to a code question  ("qiumingcheng" <qiumingcheng@aliyun.com>)
List pgsql-bugs
On Tue, 5 Apr 2022 at 17:42, qiumingcheng <qiumingcheng@aliyun.com> wrote:
> When I read the code, the following code may be wrong, please help to confirm:at following 1, why the calculation of
thepointer is calculated twice, thank you very much. 

/*
* Estimate number of hashtable entries we can have within maxbytes. This
* estimates the hash cost as sizeof(PagetableEntry), which is good enough
* for our purpose.  Also count an extra Pointer per entry for the arrays
* created during iteration readout.
*/

"arrays" is plural in the comment above. Maybe the comment would be
better to spell it out more clearly. I imagine it's talking about the
spages and schunks arrays which are created in tbm_begin_iterate().

David



pgsql-bugs by date:

Previous
From: "qiumingcheng"
Date:
Subject: a code question
Next
From: archana srinivas
Date:
Subject: SAVEPOINT issue