From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | benoit(dot)lobreau(at)gmail(dot)com |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pg_shmem_allocations & documentation |
Date: | 2020-12-11 02:00:58 |
Message-ID: | 20201211.110058.1671739809253771531.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Thu, 10 Dec 2020 11:07:47 +0100, Benoit Lobréau <benoit(dot)lobreau(at)gmail(dot)com> wrote in
> Hi,
>
> While reading the documentation of pg_shmem_allocations, I noticed that the
> off column is described as such :
>
> "The offset at which the allocation starts. NULL for anonymous allocations
> and unused memory."
>
> Whereas, the view returns a value for unused memory:
>
> [local]:5433 postgres(at)postgres=# SELECT * FROM pg_shmem_allocations WHERE
> name IS NULL;
> name | off | size | allocated_size
> ------+-----------+---------+----------------
> ¤ | 178095232 | 1923968 | 1923968
> (1 row)
>
> From what I understand, the doc is wrong.
> Am I right ?
Good catch! I think you're right. It seems to me the conclusion in
the discussion is to expose the offset for free memory.
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.
> Benoit
>
> [1] https://www.postgresql.org/docs/13/view-pg-shmem-allocations.html
> [2]
> https://www.postgresql.org/message-id/flat/20140504114417.GM12715%40awork2.anarazel.de
> (original thread)
regards.
¤
--
Kyotaro Horiguchi
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
fix_doc_for_pg_shmem_allocations_off.patch | text/x-patch | 679 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2020-12-11 02:02:51 | Re: Autovacuum worker doesn't immediately exit on postmaster death |
Previous Message | Bharath Rupireddy | 2020-12-11 01:54:41 | Re: Fail Fast In CTAS/CMV If Relation Already Exists To Avoid Unnecessary Rewrite, Planning Costs |