Re: Patch to address creation of PgStat* contexts with null parent context

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Patch to address creation of PgStat* contexts with null parent context
Дата
Msg-id 20220905224737.k7m7snxydkcf7pdk@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: Patch to address creation of PgStat* contexts with null parent context  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
Hi,

On 2022-09-05 17:32:20 +0900, Kyotaro Horiguchi wrote:
> The rationale of creating them at pgstat_attach_shmem is that anyway once
> pgstat_attach_shmem is called, the process fainally creates the contexts at
> the end of the process, and (I think) it's simpler that we don't do if()
> check at every pgstat_get_entry_ref() call.

But that's not true, as pointed out here:
https://postgr.es/m/20220808192020.nc556tlgcp66fdgw%40awork3.anarazel.de

Nor does it make sense to reserve memory for the entire lifetime of a process
just because we might need it for a split second at the end.

Greetings,

Andres Freund



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Modernizing our GUC infrastructure
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Reducing the chunk header sizes on all memory context types