Re: pg_shmem_allocations & documentation

From: Benoit Lobréau <benoit(dot)lobreau(at)gmail(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: michael(at)paquier(dot)xyz, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_shmem_allocations & documentation
Date: 2020-12-11 08:58:29
Message-ID: CAPE8EZ4vDBd9EXbO9teEBzoZCn1Uk4_3hdGrXbjAgPqTjwD+Fg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Would "NULL for anonymous allocations, since details related to them are
not known." be ok ?

Le ven. 11 déc. 2020 à 09:29, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> a
écrit :

> At Fri, 11 Dec 2020 14:42:45 +0900, Michael Paquier <michael(at)paquier(dot)xyz>
> wrote in
> > 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.
>
> Hmm. I don't object to that. Howerver, isn't the description for
> allocated_size too verbose in that sense?
>
> regards.
>
> --
> Kyotaro Horiguchi
> NTT Open Source Software Center
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2020-12-11 09:33:46 Re: Fail Fast In CTAS/CMV If Relation Already Exists To Avoid Unnecessary Rewrite, Planning Costs
Previous Message Kyotaro Horiguchi 2020-12-11 08:44:07 Re: pg_waldump error message fix