Re: Add tracking of backend memory allocated to pg_stat_activity

Поиск
Список
Период
Сортировка
От Ted Yu
Тема Re: Add tracking of backend memory allocated to pg_stat_activity
Дата
Msg-id CALte62zc20PuSc=iCg+2-+-3Bh6k4xPXVUZZCuF5mpfh5SjSMg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add tracking of backend memory allocated to pg_stat_activity  (Reid Thompson <reid.thompson@crunchydata.com>)
Список pgsql-hackers


On Sat, Nov 26, 2022 at 9:32 PM Reid Thompson <reid.thompson@crunchydata.com> wrote:
On Sat, 2022-11-26 at 22:10 -0500, Reid Thompson wrote:
> Code rebased to current master.
> Updated to incorporate additional recommendations from the the list
>    - add units to variables in view
>    - remove 'backend_' prefix from variables/functions
>    - update documentation
>    - add functional test for allocated_bytes
>    - refactor allocation reporting to reduce number of functions and
>      branches/reduce performance hit
>    - zero allocated bytes after fork to avoid double counting
> postmaster allocations
>
>
>
>

attempt to remedy cfbot windows build issues


Hi,

+               if (request_size > *mapped_size)
+               {
+                       pgstat_report_allocated_bytes(*mapped_size, DECREASE);
+                       pgstat_report_allocated_bytes(request_size, INCREASE);

pgstat_report_allocated_bytes is called twice for this case. Can the two calls be combined into one (with request_size - *mapped_size, INCREASE) ?

Cheers

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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: Documentation for building with meson
Следующее
От: Justin Pryzby
Дата:
Сообщение: Re: Add tracking of backend memory allocated to pg_stat_activity