Re: _mdfd_getseg can be expensive
От | Tom Lane |
---|---|
Тема | Re: _mdfd_getseg can be expensive |
Дата | |
Msg-id | 5725.1414861060@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: _mdfd_getseg can be expensive (Andres Freund <andres@2ndquadrant.com>) |
Ответы |
Re: _mdfd_getseg can be expensive
|
Список | pgsql-hackers |
Andres Freund <andres@2ndquadrant.com> writes: > On 2014-10-31 18:48:45 -0400, Tom Lane wrote: >> While the basic idea is sound, this particular implementation seems >> pretty bizarre. What's with the "md_seg_no" stuff, and why is that >> array typed size_t? > It stores the length of the array of _MdfdVec entries. Oh. "seg_no" seems like not a very good choice of name then. Perhaps "md_seg_count" or something like that would be more intelligible. And personally I'd have made it an int, because we are certainly not doing segment-number arithmetic in anything wider than int anywhere else. Introducing size_t into the mix won't do anything except create a risk of signed-vs-unsigned logic bugs. regards, tom lane
В списке pgsql-hackers по дате отправления: