Re: Add tracking of backend memory allocated to pg_stat_activity

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: Add tracking of backend memory allocated to pg_stat_activity
Дата
Msg-id 20221127154053.GS11463@telsasoft.com
обсуждение исходный текст
Ответ на Re: Add tracking of backend memory allocated to pg_stat_activity  (Reid Thompson <reid.thompson@crunchydata.com>)
Ответы Re: Add tracking of backend memory allocated to pg_stat_activity  (Ted Yu <yuzhihong@gmail.com>)
Re: Add tracking of backend memory allocated to pg_stat_activity  (Reid Thompson <reid.thompson@crunchydata.com>)
Список pgsql-hackers
On Sun, Nov 27, 2022 at 12:32:19AM -0500, Reid Thompson wrote:
> @@ -32,6 +33,12 @@ typedef enum BackendState
>      STATE_DISABLED
>  } BackendState;
>  
> +/* Enum helper for reporting memory allocated bytes */
> +enum allocation_direction
> +{
> +    DECREASE = -1,
> +    INCREASE = 1,
> +};

BTW, these should have some kind of prefix, like PG_ALLOC_* to avoid
causing the same kind of problem for someone else that another header
caused for you by defining something somewhere called IGNORE (ignore
what, I don't know).  The other problem was probably due to a define,
though.  Maybe instead of an enum, the function should take a boolean.

I still wonder whether there needs to be a separate CF entry for the
0001 patch.  One issue is that there's two different lists of people
involved in the threads.

-- 
Justin



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

Предыдущее
От: Ted Yu
Дата:
Сообщение: Re: Add tracking of backend memory allocated to pg_stat_activity
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: pglz compression performance, take two