Re: pg_shmem_allocations & documentation
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: benoit.lobreau@gmail.com
Cc: pgsql-hackers@postgresql.org
Date: 2020-12-11T02:00:58Z
Lists: pgsql-hackers
Attachments
- fix_doc_for_pg_shmem_allocations_off.patch (text/x-patch) patch
At Thu, 10 Dec 2020 11:07:47 +0100, Benoit Lobréau <benoit.lobreau@gmail.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@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
Commits
-
doc: Fix explanation related to pg_shmem_allocations
- d28a14d2d400 13.2 landed
- bce641a2af71 14.0 landed