Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oNImK-0007qY-Qa for pgsql-docs@arkaria.postgresql.org; Sun, 14 Aug 2022 18:56:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oNImI-0001VY-5y for pgsql-docs@arkaria.postgresql.org; Sun, 14 Aug 2022 18:56:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oNImG-0001VP-P4 for pgsql-docs@lists.postgresql.org; Sun, 14 Aug 2022 18:56:01 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oNImC-00047w-Bw for pgsql-docs@lists.postgresql.org; Sun, 14 Aug 2022 18:56:00 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 4C4605C00C3; Sun, 14 Aug 2022 14:55:53 -0400 (EDT) Received: from imap49 ([10.202.2.99]) by compute2.internal (MEProxy); Sun, 14 Aug 2022 14:55:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eulerto.com; h= cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1660503353; x=1660589753; bh=fNUQ4O+Eeu 6z5bmNRw/jTf/Dr+Jz+YGOVm7QL/mwGSI=; b=VmowijuhT1/2Omkh0a6xZsxK+N m7PZFPHL8LAYGIEpbnC9QI5iMICB9urBrtK5dMoNxkXN/8w5WkTLZkxpCWzpRr8X 1IE2tI5nLrfxrUhnZ7rEzIWsYepl4ttzCMKpKenu2KDBxs79jko7yUmy8bfvPIIi vNqmaAHYU8lj6XwTPfJMI9xfwJFX0StHEt6UFs8+mBLMltl9AjcYFcxRMqht+12p 14pyu1OLBL4DRW+E2t7JjJ9YUzbzkxdmRUGgiTW1eGxUBmvz25+nf2G6V4GPiNXt KfvtzR9HDTjcsxek5JKSs2mgR6Kg3EvzdnGu8puMRs7GAwP91AHaS3cZV/eg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1660503353; x=1660589753; bh=fNUQ4O+Eeu6z5bmNRw/jTf/Dr+Jz +YGOVm7QL/mwGSI=; b=GXoI3wexmk7ZVHzhFxYTIeWGO+f22iMOTxGSOf6dCiv+ lHTKZJcIOp77YIWoIIzFKv3NgpZzBZPSveBda31bRLlFkKk/l5OdYT1oINqnfbQc gEn7tQ4MDa9vVc+1bPW4AhWTEcFS1znBvc87SVDqRUFogbCHyaGpP/BPboLhueq0 Z/ySb6PD1idFdEI1Ax3FS8cZMs7PKUcf1pZkZCTVFYtQNLEpHh3DuNOUF/Xkywdn eyxwfz6ZQ7/OjhUciS1j+9kv32TWDg4oYgpq94wT64vxgiv9vudEUEwlRvSWrZM4 lky5elPPEHZVezmh8MYGMrmGlUHhmEUDzGdjdW23mQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdehtddgudeffecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesmh dtreerreertdenucfhrhhomhepfdfguhhlvghrucfvrghvvghirhgrfdcuoegvuhhlvghr segvuhhlvghrthhordgtohhmqeenucggtffrrghtthgvrhhnpefhvdelgfekvdetjeejte fhudejfeeileetjeeufeetffegjedtvdeukedtgeffgeenucffohhmrghinhepvghnthgv rhhprhhishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepvghulhgvrhesvghulhgvrhhtohdrtghomh X-ME-Proxy: Feedback-ID: i0c21471d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 75EE215A0087; Sun, 14 Aug 2022 14:55:52 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-841-g7899e99a45-fm-20220811.002-g7899e99a Mime-Version: 1.0 Message-Id: In-Reply-To: <166033703458.653.1583077816076994614@wrigleys.postgresql.org> References: <166033703458.653.1583077816076994614@wrigleys.postgresql.org> Date: Sun, 14 Aug 2022 15:55:32 -0300 From: "Euler Taveira" To: coleman.rik@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: 52.88. pg_shmem_allocations, missing units Content-Type: multipart/mixed; boundary=8e821c8fbd104171bb70daf1b3bcee8b List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --8e821c8fbd104171bb70daf1b3bcee8b Content-Type: multipart/alternative; boundary=83846e82dc91476ca153cb63c8039773 --83846e82dc91476ca153cb63c8039773 Content-Type: text/plain 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/ --83846e82dc91476ca153cb63c8039773 Content-Type: text/html Content-Transfer-Encoding: quoted-printable
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_all= ocations?  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   &= nbsp;   *location;       /* loca= tion in shared mem */
    Size  &= nbsp;     size;      &= nbsp;    /* # bytes requested for the structure */
    Size       = ; allocated_size; /* # bytes actually allocated */
} Shmem= IndexEnt;

The unit is bytes. A patch is att= ached to add such information.


--
Euler Taveira

--83846e82dc91476ca153cb63c8039773-- --8e821c8fbd104171bb70daf1b3bcee8b Content-Disposition: attachment;filename="doc-shmem-alloc.diff" Content-Type: text/x-patch; name="doc-shmem-alloc.diff" Content-Transfer-Encoding: BASE64 ZGlmZiAtLWdpdCBhL2RvYy9zcmMvc2dtbC9zeXN0ZW0tdmlld3Muc2dtbCBiL2RvYy9zcmMv c2dtbC9zeXN0ZW0tdmlld3Muc2dtbAppbmRleCA5NzI4MDM5ZTcxLi40NGFhNzBhMDMxIDEw MDY0NAotLS0gYS9kb2Mvc3JjL3NnbWwvc3lzdGVtLXZpZXdzLnNnbWwKKysrIGIvZG9jL3Ny Yy9zZ21sL3N5c3RlbS12aWV3cy5zZ21sCkBAIC0zNDg1LDcgKzM0ODUsNyBAQCBTRUxFQ1Qg KiBGUk9NIHBnX2xvY2tzIHBsIExFRlQgSk9JTiBwZ19wcmVwYXJlZF94YWN0cyBwcHgKICAg ICAgICA8c3RydWN0ZmllbGQ+c2l6ZTwvc3RydWN0ZmllbGQ+IDx0eXBlPmludDg8L3R5cGU+ CiAgICAgICA8L3BhcmE+CiAgICAgICA8cGFyYT4KLSAgICAgICBTaXplIG9mIHRoZSBhbGxv Y2F0aW9uCisgICAgICAgU2l6ZSBvZiB0aGUgYWxsb2NhdGlvbiBpbiBieXRlcwogICAgICAg PC9wYXJhPjwvZW50cnk+CiAgICAgIDwvcm93PgogCkB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