Re: pg_shmem_allocations & documentation

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pg_shmem_allocations & documentation
Дата
Msg-id X9MG1XrZBrTmLMWq@paquier.xyz
обсуждение исходный текст
Ответ на Re: pg_shmem_allocations & documentation  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Ответы Re: pg_shmem_allocations & documentation  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
On Fri, Dec 11, 2020 at 11:00:58AM +0900, Kyotaro Horiguchi wrote:
> Although we could just rip some words off, I'd like to propose instead
> to add an explanation why it is not exposed for anonymous allocations,
> like the column allocated_size.

Indeed, there is a hiccup between what the code does and what the docs
tell: the offset is not NULL for unused memory.

> -       The offset at which the allocation starts. NULL for anonymous
> -       allocations and unused memory.
> +       The offset at which the allocation starts. For anonymous allocations,
> +       no information about individual allocations is available, so the column
> +       will be NULL in that case.

I'd say: let's be simple and just remove "and unused memory" because
anonymous allocations are...  Anonymous so you cannot know details
related to them.  That's something easy to reason about, and the docs
were written originally to remain simple.
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pg_waldump error message fix
Следующее
От: "Hou, Zhijie"
Дата:
Сообщение: RE: Fail Fast In CTAS/CMV If Relation Already Exists To Avoid Unnecessary Rewrite, Planning Costs