| From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
|---|---|
| To: | qiumingcheng <qiumingcheng(at)aliyun(dot)com> |
| Cc: | pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: a code question |
| Date: | 2022-04-05 07:14:04 |
| Message-ID: | CAApHDvoebxs+wA4-XtDY2JiUT7bxPE8+xZ2DDW7SmwOti2rqrw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On Tue, 5 Apr 2022 at 17:42, qiumingcheng <qiumingcheng(at)aliyun(dot)com> wrote:
> When I read the code, the following code may be wrong, please help to confirm:at following 1, why the calculation of the pointer 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | archana srinivas | 2022-04-05 14:21:24 | SAVEPOINT issue |
| Previous Message | qiumingcheng | 2022-04-05 05:41:57 | a code question |