Thread

Commits

  1. doc: Add unit to pg_shmem_allocations attributes

  1. 52.88. pg_shmem_allocations, missing units

    The Post Office <noreply@postgresql.org> — 2022-08-12T20:43:54Z

    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.
    
  2. Re: 52.88. pg_shmem_allocations, missing units

    Euler Taveira <euler@eulerto.com> — 2022-08-14T18:55:32Z

    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/
    
  3. Re: 52.88. pg_shmem_allocations, missing units

    Masahiko Sawada <sawada.mshk@gmail.com> — 2022-08-15T02:23:02Z

    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/
    
    
    
    
  4. Re: 52.88. pg_shmem_allocations, missing units

    Daniel Gustafsson <daniel@yesql.se> — 2022-08-15T11:27:58Z

    > 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/