Re: Improve monitoring of shared memory allocations

Поиск
Список
Период
Сортировка
От Rahila Syed
Тема Re: Improve monitoring of shared memory allocations
Дата
Msg-id CAH2L28vaktm0UXw19y22w+DThcqV80-UKtVfMxPeVw8ro2yTDg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Improve monitoring of shared memory allocations  (Tomas Vondra <tomas@vondra.me>)
Ответы Re: Improve monitoring of shared memory allocations
Список pgsql-hackers
Hi,

I think it's almost committable. Attached is v8 with some minor review
adjustments, and updated commit messages. Please read through those and
feel free to suggest changes.

 
The changes look good to me. 
About the following question.
   /* XXX what about segment size? should check have HASH_SEGMENT? */
Do you mean for a shared hash table should the caller have specified HASH_SEGMENT
in flags?
It appears that the current code does not require this change. All the shared hash tables seem
to have the default segment size. 
I left the comment as it is as I am not sure if you intend to remove it or not.
 
I still found the hash_get_init_size() comment unclear, and it also
referenced init_size, which is no longer relevant. I improved the
comment a bit (I find it useful to mimic comments of nearby functions,
so I did that too here). The "initial_elems" name was a bit confusing,
as it seemed to suggest "number of elements", but it's a simple flag. So
I renamed it to "prealloc", which seems clearer to me. I also tweaked
(reordered/reformatted) the conditions a bit.

I appreciate your edtis, the comment and code are clearer now.

PFA the patches after merging the review patches.

Thank you,
Rahila Syed
Вложения

В списке pgsql-hackers по дате отправления: