From: Euler Taveira <euler@eulerto.com>
To: coleman.rik@gmail.com
To: pgsql-docs@lists.postgresql.org
Subject: Re: 52.88. pg_shmem_allocations, missing units
Date: Sun, 14 Aug 2022 15:55:32 -0300
Message-ID: <f2af03ee-f3eb-43d7-abcd-d63657e5aab4@www.fastmail.com> (raw)
In-Reply-To: <166033703458.653.1583077816076994614@wrigleys.postgresql.org>
References: <166033703458.653.1583077816076994614@wrigleys.postgresql.org>
On Fri, Aug 12, 2022, at 5:43 PM, PG Doc comments form wrote:
> Could someone add the units of size & allocated_size on the documentation
> for pg_shmem_allocations? Currently there aren't any listed.
According to ShmemIndexEnt struct:
/* this is a hash bucket in the shmem index table */
typedef struct
{
char key[SHMEM_INDEX_KEYSIZE]; /* string name */
void *location; /* location in shared mem */
Size size; /* # bytes requested for the structure */
Size allocated_size; /* # bytes actually allocated */
} ShmemIndexEnt;
The unit is bytes. A patch is attached to add such information.
--
Euler Taveira
EDB https://www.enterprisedb.com/Attachments:
[text/x-patch] doc-shmem-alloc.diff (1002B, ../f2af03ee-f3eb-43d7-abcd-d63657e5aab4@www.fastmail.com/3-doc-shmem-alloc.diff)
download | inline diff:diff --git a/doc/src/sgml/system-views.sgml b/doc/src/sgml/system-views.sgmlindex 9728039e71..44aa70a031 100644--- a/doc/src/sgml/system-views.sgml+++ b/doc/src/sgml/system-views.sgml@@ -3485,7 +3485,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
<structfield>size</structfield> <type>int8</type>
</para>
<para>
- Size of the allocation+ Size of the allocation in bytes
</para></entry>
</row>
@@ -3494,7 +3494,7 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx
<structfield>allocated_size</structfield> <type>int8</type>
</para>
<para>
- Size of the allocation including padding. For anonymous+ Size of the allocation in bytes including padding. For anonymous
allocations, no information about padding is available, so the
<literal>size</literal> and <literal>allocated_size</literal> columns
will always be equal. Padding is not meaningful for free memory, so
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: euler@eulerto.com, coleman.rik@gmail.com, pgsql-docs@lists.postgresql.org
Subject: Re: 52.88. pg_shmem_allocations, missing units
In-Reply-To: <f2af03ee-f3eb-43d7-abcd-d63657e5aab4@www.fastmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox