Re: Improve monitoring of shared memory allocations

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



> +             if (hashp->isshared)
> +             {
> +                     int                     nsegs;
> +                     int                     nbuckets;
> +                     nsegs = find_num_of_segs(nelem, &nbuckets, hctl->num_partitions, hctl->ssize);
> +                     
> +                     curr_offset =  (((char *) hashp->hctl) + sizeof(HASHHDR) + (info->dsize * sizeof(HASHSEGMENT)) +
> +                        + (sizeof(HASHBUCKET) * hctl->ssize * nsegs));
> +             }
> +

Why only do this for shared hashtables? Couldn't we allocate the elments
together with the rest for non-share hashtables too?


I have now made the changes uniformly across shared and non-shared hash tables, 
making the code fix look cleaner. I hope this aligns with your suggestions. 
Please find attached updated and rebased versions of both patches.

Kindly let me know your views.

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

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