pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feed52.88. pg_shmem_allocations, missing units
4+ messages / 4 participants
[nested] [flat]
* 52.88. pg_shmem_allocations, missing units
@ 2022-08-12 20:43 PG Doc comments form <noreply@postgresql.org>
2022-08-14 18:55 ` Re: 52.88. pg_shmem_allocations, missing units Euler Taveira <euler@eulerto.com>
0 siblings, 1 reply; 4+ messages in thread
From: PG Doc comments form @ 2022-08-12 20:43 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org; +Cc: coleman.rik@gmail.com
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/14/view-pg-shmem-allocations.html
Description:
Could someone add the units of size & allocated_size on the documentation
for pg_shmem_allocations? Currently there aren't any listed.
https://www.postgresql.org/docs/current/view-pg-shmem-allocations.html
Thanks,
rik.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: 52.88. pg_shmem_allocations, missing units
2022-08-12 20:43 52.88. pg_shmem_allocations, missing units PG Doc comments form <noreply@postgresql.org>
@ 2022-08-14 18:55 ` Euler Taveira <euler@eulerto.com>
2022-08-15 02:23 ` Re: 52.88. pg_shmem_allocations, missing units Masahiko Sawada <sawada.mshk@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Euler Taveira @ 2022-08-14 18:55 UTC (permalink / raw)
To: coleman.rik@gmail.com; pgsql-docs@lists.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.sgml
index 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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: 52.88. pg_shmem_allocations, missing units
2022-08-12 20:43 52.88. pg_shmem_allocations, missing units PG Doc comments form <noreply@postgresql.org>
2022-08-14 18:55 ` Re: 52.88. pg_shmem_allocations, missing units Euler Taveira <euler@eulerto.com>
@ 2022-08-15 02:23 ` Masahiko Sawada <sawada.mshk@gmail.com>
2022-08-15 11:27 ` Re: 52.88. pg_shmem_allocations, missing units Daniel Gustafsson <daniel@yesql.se>
0 siblings, 1 reply; 4+ messages in thread
From: Masahiko Sawada @ 2022-08-15 02:23 UTC (permalink / raw)
To: Euler Taveira <euler@eulerto.com>; +Cc: coleman.rik@gmail.com; pgsql-docs@lists.postgresql.org
On Mon, Aug 15, 2022 at 3:56 AM Euler Taveira <euler@eulerto.com> wrote:
>
> 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.
+1
The patch looks good to me.
Regards,
--
Masahiko Sawada
EDB: https://www.enterprisedb.com/
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: 52.88. pg_shmem_allocations, missing units
2022-08-12 20:43 52.88. pg_shmem_allocations, missing units PG Doc comments form <noreply@postgresql.org>
2022-08-14 18:55 ` Re: 52.88. pg_shmem_allocations, missing units Euler Taveira <euler@eulerto.com>
2022-08-15 02:23 ` Re: 52.88. pg_shmem_allocations, missing units Masahiko Sawada <sawada.mshk@gmail.com>
@ 2022-08-15 11:27 ` Daniel Gustafsson <daniel@yesql.se>
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Gustafsson @ 2022-08-15 11:27 UTC (permalink / raw)
To: Masahiko Sawada <sawada.mshk@gmail.com>; +Cc: Euler Taveira <euler@eulerto.com>; coleman.rik@gmail.com; pgsql-docs@lists.postgresql.org
> On 15 Aug 2022, at 04:23, Masahiko Sawada <sawada.mshk@gmail.com> wrote:
>
> On Mon, Aug 15, 2022 at 3:56 AM Euler Taveira <euler@eulerto.com> wrote:
>>
>> 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.
>
> +1
>
> The patch looks good to me.
Agreed, and adding the unit matches how other system views attributes like
pg_stat.avg_width. Will apply it in a bit.
--
Daniel Gustafsson https://vmware.com/
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2022-08-15 11:27 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-08-12 20:43 52.88. pg_shmem_allocations, missing units PG Doc comments form <noreply@postgresql.org>
2022-08-14 18:55 ` Euler Taveira <euler@eulerto.com>
2022-08-15 02:23 ` Masahiko Sawada <sawada.mshk@gmail.com>
2022-08-15 11:27 ` Daniel Gustafsson <daniel@yesql.se>
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