pg_shmem_allocations & documentation

From: Benoit Lobréau <benoit(dot)lobreau(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_shmem_allocations & documentation
Date: 2020-12-10 10:07:47
Message-ID: CAPE8EZ5Lnoyqoz7aZpvQM0E8sW+hw+k6G2NULe+m4arFRrA1aA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 ?

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)

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2020-12-10 10:15:33 Re: Single transaction in the tablesync worker?
Previous Message Dilip Kumar 2020-12-10 09:56:37 Re: Parallel INSERT (INTO ... SELECT ...)